|
ESPHome 2026.11.0-dev
|
Functions | |
| uint32_t | extract_unicode_codepoint (const char *utf8_str, size_t *length) |
| Attempt to extract a 32 bit Unicode codepoint from a UTF-8 string. | |
| uint32_t esphome::unicode::extract_unicode_codepoint | ( | const char * | utf8_str, |
| size_t * | length ) |
Attempt to extract a 32 bit Unicode codepoint from a UTF-8 string.
If successful, return the codepoint and set the length to the number of bytes read. If the end of the string has been reached and a valid codepoint has not been found, return 0 and set the length to 0.
| utf8_str | The input string |
| length | Pointer to length storage |
Definition at line 5 of file unicode.cpp.