The musl strtok string library function in C

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 4

  • @beastdope1652
    @beastdope1652 Рік тому

    Great explanation sir. Thank you so much. I was kinda confused when I tried to implement this function by myself. Now I have some understanding how it goes. Cheers

  • @GeorgeTsiros
    @GeorgeTsiros 8 місяців тому

    static variable? Am I weird for considering it b---? Ah. I'm not xD.
    I wrote my own tokenizer. It takes a pointer to a struct that carries the tokenizer state. Basically a "class" in more steps. Only issue I see with it is that the tokenizer function assumes the input string does not change between calls. I _could_ make the tokenizer checksum the entire string at every call and return a failure if the string has changed. I am uncertain which is the better choice. (I am not writing library code(

  • @beastdope1652
    @beastdope1652 Рік тому

    Btw where did you get that code?

  • @chineduelijah9785
    @chineduelijah9785 2 роки тому

    Thank you