Item | Value |
Header file | stdlib.h |
Declaration | int mblen(const char *str, size_t size); |
Function | returns the length (in bytes) of a multibyte character pointed to by str. Only the first size number of characters are examined. It returns -1 on error. |
Return | If str is null, then mblen() returns nonzero if multibyte characters have state-dependent encodings. If they do not, zero is returned. |
#include <stdlib.h> #include <stdio.h> int main(void){ char *md = "asdfasdf"; printf("%d", mblen(md, 2)); }
1
23.20.mblen | ||||
23.20.1. | mblen |