![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Find the number of UTF-8 characters in part of a string
#include <utf8.h>
int utf8strblen( char const *text,
int max_bytes,
int *bytes );
ph
The utf8strblen() function returns the number of UTF-8 characters made up of max_bytes bytes in the string text, and sets bytes to the number of bytes used to compose the number of UTF-8 characters returned.
The bytes argument won't equal max_bytes if there are fewer than max_bytes bytes in the string, or if the last byte doesn't fall at the end of a UTF-8 character.
The number of UTF-8 characters made up of max_bytes bytes in the string text.
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
utf8len(), utf8strlen(), utf8strnlen()
Unicode Multilingual Support in the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |