C <stdlib.h> - MB_CUR_MAX constant
The C <stdlib.h> MB_CUR_MAX is a macro constant that expands to a positive integer expression of type size_t, the value of which is the maximum number of bytes in a multibyte character with the current locale (category LC_CTYPE). Its value is never greater than MB_LEN_MAX.
In the <stdlib.h> header file, it is defined as follows:
#define MB_CUR_MAX /* implementation defined */
Example:
The example below shows the value of MB_CUR_MAX constant in an environment's default locale.
#include <stdio.h> #include <locale.h> #include <stdlib.h> int main (){ //setting LC_CTYPE to Environment's //default locale setlocale(LC_CTYPE, ""); //displaying the value of MB_CUR_MAX printf("MB_CUR_MAX = %ld\n", MB_CUR_MAX); return 0; }
One of the possible output of the above code could be:
MB_CUR_MAX = 1
❮ C <stdlib.h> Library