Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/utf8/utf8strblen.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/utf8/utf8strblen.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/utf8/utf8strblen.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/utf8/utf8strblen.html on line 8

utf8strblen()

Find the number of UTF-8 characters in part of a string

Synopsis:

#include <utf8.h>

int utf8strblen( char const *text, 
                 int max_bytes, 
                 int *bytes );

Arguments:

text
A UTF-8 string.
max_bytes
The maximum number of bytes to count.
bytes
A pointer to a location where utf8strblen() stores the number of characters in the specified portion of the string.

Library:

ph

Description:

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.

Returns:

The number of UTF-8 characters made up of max_bytes bytes in the string text.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

utf8len(), utf8strlen(), utf8strnlen()

Unicode Multilingual Support in the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/utf8/utf8strblen.html on line 124

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/utf8/utf8strblen.html on line 124