--- a/docs/Writerside/topics/string.h.md Thu Dec 25 11:48:25 2025 +0100 +++ b/docs/Writerside/topics/string.h.md Thu Dec 25 12:07:37 2025 +0100 @@ -268,13 +268,11 @@ void cx_strtok_delim(CxStrtokCtx *ctx, const cxstring *delim, size_t count); -bool cx_strtok_next(CxStrtokCtx *ctx, cxstring *token); - -bool cx_strtok_next_m(CxStrtokCtx *ctx, cxmutstr *token); +bool cx_strtok_next(CxStrtokCtx *ctx, UcxStr* token); ``` You can tokenize a string by creating a _tokenization_ context with `cx_strtok()`, -and calling `cx_strtok_next()` or `cx_strtok_next_m()` as long as they return `true`. +and calling `cx_strtok_next()` as long as it returns `true`. The tokenization context is initialized with the string `str` to tokenize, one delimiter `delim`, and a `limit` for the maximum number of tokens. @@ -283,10 +281,10 @@ You can add additional delimiters to the context by calling `cx_strtok_delim()`, and specifying an array of delimiters to use. -> Regardless of how the context was initialized, you can use either `cx_strtok_next()` -> or `cx_strtok_next_m()` to retrieve the tokens. However, keep in mind that modifying -> characters in a token returned by `cx_strtok_next_m()` has only defined behavior, when the -> underlying `str` is a `cxmutstr`. +> Regardless of how the context was initialized, you can use `cx_strtok_next()` +> with pointers to `cxstring` or `cxmutstr`. However, keep in mind that modifying +> characters in a `cxmutstr` has only defined behavior, when the +> underlying `str` is also a `cxmutstr` that was not initalized with constant memory. ### Example