Mbrlen

Mbrlen is a feature of the .
Mbrlen
It determines the length of multibyte character
requirement
It require the header file <wchar.h>
syntax
size_t mbrlen(const char *s, size_t n, mbstate_t *ps);
return value
*If the string is less than n characters in length, each of these functions returns the number of characters in str, excluding the terminal NULL.
*If the string is greater than n characters in length,n is returned.
* 0 :If the next n or fewer bytes complete the character that corresponds to the null wide-character
* positive : If the next n or fewer bytes complete a valid character; the value returned is the number of bytes that complete the character.
* (size_t)-2 : If the next n bytes contribute to an incomplete but potentially valid character, and all n bytes have been processed. When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a sequence of redundant shift sequences (for implementations with state-dependent encodings).
*(size_t) -1 : If an encoding error occurs, in which case the next n or fewer bytes do not contribute to a complete and valid character. In this case, EILSEQ is stored in errno and the conversion state is undefined.
source
*http://msdn.microsoft.com/en-us/library/tt1kc7c1(v=VS.90).aspx
*http://www.google.co.in/
*Linux manual page
 
< Prev   Next >