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

mbstrnlen()

Find the number of bytes used by a multibyte-character string

Synopsis:

#include <photon/PhProto.h>

int mbstrnlen( char const *text, 
               int max_len, 
               int char_width, 
               int *num );

Description:

The mbstrnlen() function returns the number of bytes occupied by max_len characters in the string text.

The char_width parameter must be set to the maximum number of bytes used to represent a single character or 0 to accept the default value of 3.

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 multibyte characters in text.

Returns:

The number of bytes occupied by max_len characters in the string text.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

mbstrblen(), mbstrnlen()


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