#include <limits.h>
#include "stdlib.h"
#include "string.h"
Go to the source code of this file.
|
#define | LC_ALL 0 |
| The entire locale. More...
|
|
#define | LC_COLLATE 1 |
| Affects the behavior of strcoll and strxfrm. More...
|
|
#define | LC_CTYPE 2 |
| Affects character handling functions. More...
|
|
#define | LC_MONETARY 3 |
| Affects monetary formatting information returned by localeconv. More...
|
|
#define | LC_NUMERIC 4 |
| Affects the decimal-point character in formatted input/output operations and string formatting functions. More...
|
|
#define | LC_TIME 5 |
| Affects the behavior of strftime. More...
|
|
◆ LC_ALL
◆ LC_COLLATE
Affects the behavior of strcoll and strxfrm.
◆ LC_CTYPE
Affects character handling functions.
◆ LC_MONETARY
Affects monetary formatting information returned by localeconv.
◆ LC_NUMERIC
Affects the decimal-point character in formatted input/output operations and string formatting functions.
◆ LC_TIME
Affects the behavior of strftime.
◆ __locale_delete_char_field_value()
void __locale_delete_char_field_value |
( |
char * |
field | ) |
|
Delete (free) field's value.
Delete (free) field's value if it has been initialized previously.
- Parameters
-
field | Field's value to remove. |
◆ __locale_set_char_field_value()
char* __locale_set_char_field_value |
( |
const char * |
value | ) |
|
Set field's value.
Allocs memory for the specified field and returns it.
- Parameters
-
value | Newly created value. |
◆ __locale_set_neutral_locale()
void __locale_set_neutral_locale |
( |
int |
category | ) |
|
Set locale state to the neutral value.
Every field in the locale state will have default value (mostly "" or CHAR_MAX).
- Parameters
-
category | Portion of the locale affected (LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME). |
◆ localeconv()
Get locale formatting parameters for quantities.
Returns the length of the C string str. The length of a C string is determined by the terminating null-character.
- Returns
- A pointer to a structure object of the structure type lconv with the corresponding values for the current locale filled in.
◆ setlocale()
char* setlocale |
( |
int |
category, |
|
|
const char * |
locale |
|
) |
| |
Set or retrieve locale.
Sets locale information to be used by the current program, either changing the entire locale or portions of it. The function can also be used to retrieve the current locale's name by passing NULL as the value for argument locale.
- Parameters
-
category | Portion of the locale affected (LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME). |
locale | C string containing the name of a C locale. |
- Returns
- On success, A pointer to a C string identifying the locale currently set for the category. If category is LC_ALL and different portions of the locale are set to different values, the string returned gives this information in a format which may vary between library implementations. If the function failed to set a new locale, this is not modified and a null pointer is returned.
◆ locale_name
◆ locale_state