[Previous] [Contents] [Index] [Next]

mbstrblen()

Find the number of multibyte characters in part of a string

Synopsis:

#include <photon/PhProto.h>

int mbstrblen( char const *text, 
               int max_bytes, 
               int width, 
               int *bytes );

Description:

The mbstrblen() function returns the number of multibyte 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 multibyte characters returned.

The width argument must be the maximum number of bytes used to represent a single character, or 0 to accept the default value of 3.

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 multibyte character.

Returns:

The number of multibyte characters made up of max_bytes bytes in the string text.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

mbstrlen(), mbstrnlen()


[Previous] [Contents] [Index] [Next]