pub(crate) unsafe fn str_toks_cat_utf8(buf: &str, cat: i16) -> usize {
    let mut p = TEMP_HEAD; // tail of the token list
    *LLIST_link(p) = None.tex_int();
    for c in buf.chars() {
        // token being appended
        let t = if c == ' ' && cat == 0 {
            SPACE_TOKEN
        } else if cat == 0 {
            OTHER_TOKEN + c as i32
        } else {
            MAX_CHAR_VAL * cat as i32 + c as i32
        };
        fast_store_new_token(&mut p, t);
    }
    p
}
/// converting the current string into a token list.
///
/// The `str_toks` function does this; it classifies spaces as type `spacer`
/// and everything else as type `other_char`.
///
/// The token list created by `str_toks` begins at `link(temp_head)` and ends
/// at the value `p` that is returned. (If `p=temp_head`, the list is empty.)
converting the current string into a token list.


converting the current string into a token list .
pub(crate) unsafe fn str_toks_cat_utf8(buf: &str, cat: i16) -> usize {
    let mut p = TEMP_HEAD; // tail of the token list
    *LLIST_link(p) = None.tex_int();
    for c in buf.chars() {
        // token being appended
        let t = if c == ' ' && cat == 0 {
            SPACE_TOKEN
        } else if cat == 0 {
            OTHER_TOKEN + c as i32
        } else {
            MAX_CHAR_VAL * cat as i32 + c as i32
        };
        fast_store_new_token(&mut p, t);
    }
    p
}
pub ( crate ) unsafe fn str_toks_cat_utf8 ( buf : & str , cat : i16 ) -> usize { let mut p = TEMP_HEAD ; // tail of the token list * LLIST_link ( p ) = None . tex_int ( ) ; for c in buf . chars ( ) { // token being appended let t = if c == ' ' && cat == 0 { SPACE_TOKEN } else if cat == 0 { OTHER_TOKEN + c as i32 } else { MAX_CHAR_VAL * cat as i32 + c as i32 } ; fast_store_new_token ( & mut p , t ) ; } p }
converting the current string into a token list.
converting the current string into a token list .
buf
&str
cat
i16