Find the length of a multibyte character string
#include <photon/PhProto.h> int mbstrlen( char const *text, int char_width, int *bytes );
The mbstrlen() function returns the number of multibyte characters in the string text, and sets bytes to the number of bytes in text.
The char_width must be set to the maximum number of bytes used to represent a single character. Setting char_width to 0 will use the maximum character width.
The number of multibyte characters in the string.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |