|
CX Framework
Cross-platform C utility framework
|
Functions | |
| _striU8Anno bool | striU8Char (striter *i, int32 *out) |
| _striPeekU8Anno bool | striPeekU8Char (striter *i, int32 *out) |
| bool | striAdvanceU8 (striter *i, uint32 by) |
These functions operate on UTF-8 code points rather than raw bytes. They handle multi-byte sequences automatically.
| bool striAdvanceU8 | ( | striter * | i, |
| uint32 | by | ||
| ) |
Advances by a specified number of UTF-8 code points
Moves forward by 'by' UTF-8 characters, automatically handling multi-byte sequences. Returns false if the end of string is reached or invalid UTF-8 is encountered.
| i | Iterator to advance |
| by | Number of UTF-8 code points to skip |
Example:
| _striPeekU8Anno bool striPeekU8Char | ( | striter * | i, |
| int32 * | out | ||
| ) |
Retrieves the next UTF-8 code point without advancing cursor
Decodes the next UTF-8 sequence but doesn't advance the cursor. Useful for lookahead in parsers.
| i | Iterator to read from |
| out | Pointer to store the Unicode code point |
Example:
| _striU8Anno bool striU8Char | ( | striter * | i, |
| int32 * | out | ||
| ) |
Decodes the next UTF-8 sequence into a Unicode code point and advances the cursor past the entire sequence (1-4 bytes). Returns false if the end of string is reached or invalid UTF-8 is encountered.
| i | Iterator to read from |
| out | Pointer to store the Unicode code point |
Example: