![]() |
![]() |
![]() |
![]() |
Find the number of bytes used by a UTF-8 character string
#include <utf8.h> int utf8strnlen( char const *text, int max_len, int *num );
ph
The utf8strnlen() function returns the number of bytes occupied by max_len characters in the string text.
The num parameter is set to the number of characters formed by the number of bytes returned. This will be different from max_len if there are fewer than max_len UTF-8 characters in text.
The number of bytes occupied by max_len characters in the string text.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
utf8len(), utf8strblen(), utf8strnlen()
Unicode Multilingual Support in the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |