標準庫標頭檔案 <locale.h>
來自 cppreference.com
此標頭檔案是本地化庫的一部分。
型別 | ||
格式化詳情,由 localeconv 返回 (struct) | ||
常量 | ||
實現定義的空指標常量 (宏常量) | ||
setlocale 的區域設定類別 (宏常量) | ||
函式 | ||
獲取和設定當前 C 區域設定 (函式) | ||
查詢當前區域設定的數字和貨幣格式詳細資訊 (函式) |
[編輯] 概要
// In the "C" locale, the members shall have the values specified in the comments: struct lconv { char* decimal_point; // "." char* thousands_sep; // "" char* grouping; // "" char* mon_decimal_point; // "" char* mon_thousands_sep; // "" char* mon_grouping; // "" char* positive_sign; // "" char* negative_sign; // "" char* currency_symbol; // "" char frac_digits; // CHAR_MAX char p_cs_precedes; // CHAR_MAX char n_cs_precedes; // CHAR_MAX char p_sep_by_space; // CHAR_MAX char n_sep_by_space; // CHAR_MAX char p_sign_posn; // CHAR_MAX char n_sign_posn; // CHAR_MAX char* int_curr_symbol; // "" char int_frac_digits; // CHAR_MAX char int_p_cs_precedes; // CHAR_MAX char int_n_cs_precedes; // CHAR_MAX char int_p_sep_by_space; // CHAR_MAX char int_n_sep_by_space; // CHAR_MAX char int_p_sign_posn; // CHAR_MAX char int_n_sign_posn; // CHAR_MAX }; char* setlocale(int category, const char* locale); lconv* localeconv(); #define NULL /* see description */ #define LC_ALL /* see description */ #define LC_COLLATE /* see description */ #define LC_CTYPE /* see description */ #define LC_MONETARY /* see description */ #define LC_NUMERIC /* see description */ #define LC_TIME /* see description */
[編輯] 注意
- NULL 也定義在以下標頭檔案中