Anda di halaman 1dari 2

Search: Reference<clocale> Not logged in registerlog in header <clocale> (locale.

h) C localization library The C language supports localization specific settings, such as culture-specific date formats or country-specific currency symbols. Each system and specific compiler implementation may provide different choices o f locales to be selected (using function setlocale), but at least two locales ar e available to choose for any C program: The "C" locale is the minimal locale. It is a rather neutral locale which has th e same settings across all systems and compilers, and therefore the exact result s of a program using this locale are predictable. This is the locale used by def ault on all C programs. The system's default locale (which is specified by an empty C-string: ""). It is the locale configuration provided by the environment where the application is r unning. This usually contains more localization information than the "C" locale. This header declares the lconv type and the functions setlocale and localeconv, along with several macros to be used with them. These are used to define locale specific information. Notice that locale configuration affects the behavior of many functions within t he standard C library: In <cstring> (<string.h>), functions strcoll and strxfrm are affected by charact er transformation rules. In <cctype> (<ctype.h>), all functions except for isdigit and isxdigit are affec ted by the extended character set selected. In <cstdio> (<stdio.h>), formatted input/output operations are affected by chara cter transformation rules and decimal-point character set in the numeric formatt ing settings. In <ctime> (<time.h>), the function strftime is affected by the time formatting settings. In this header, it affects the value returned by its functions setlocale and loc aleconv. But some locale information is also provided to programs to better render its ou tput in a locale sensitive manner (localeconv). The functions provided in this header are: setlocale Set or retrieve locale (function ) localeconv Get locale formatting parameters for quantities (function ) The header also declares a structure type: struct lconv Formatting info for numeric values (type ) C++ Information Documentation Reference Articles Forum Reference C library:

<cassert> (assert.h) <cctype> (ctype.h) <cerrno> (errno.h) <cfloat> (float.h) <ciso646> (iso646.h) <climits> (limits.h) <clocale> (locale.h) <cmath> (math.h) <csetjmp> (setjmp.h) <csignal> (signal.h) <cstdarg> (stdarg.h) <cstdbool> (stdbool.h) <cstddef> (stddef.h) <cstdint> (stdint.h) <cstdio> (stdio.h) <cstdlib> (stdlib.h) <cstring> (string.h) <ctgmath> (tgmath.h) <ctime> (time.h) <cuchar> (uchar.h) <cwchar> (wchar.h) <cwctype> (wctype.h) Containers: Input/Output: Other: <clocale> (locale.h) functions: localeconv setlocale macros: NULL types: struct lconv Home page | Privacy policy cplusplus.com, 2000-2013 - All rights reserved - v3.1 Spotted an error? contact us

Anda mungkin juga menyukai