Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
27 views

Localization Library - Cppreference

Localization Library

Uploaded by

IoakeimTziakos
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Localization Library - Cppreference

Localization Library

Uploaded by

IoakeimTziakos
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Localization library

The locale facility includes internationalization s upport for character clas s ication and s tring collation,
numeric, monetary, and date/time formatting and pars ing, and mes s age retrieval. Locale s ettings control
the behavior of s tream I/O, regular expres s ion library, and other components of the C++ s tandard
library.

Locales
Dened in header <locale>

Locales and facets

locale
use_facet
has_facet

s et of polymorphic facets that encaps ulate cultural dierences


(c lass)

obtains a facet from a locale


(func tion template)

checks if a locale implements a s pecic facet


(func tion template)

Character classication

isspace(std::locale)

checks if a character is clas s ied as whites pace by a locale


(func tion template)

checks if a character is clas s ied as a blank character by a locale


isblank(std::locale)(C++11) (func tion template)
checks if a character is clas s ied as a control character by a locale
iscntrl(std::locale)
(func tion template)
isupper(std::locale)
islower(std::locale)
isalpha(std::locale)
isdigit(std::locale)
ispunct(std::locale)
isxdigit(std::locale)
isalnum(std::locale)
isprint(std::locale)
isgraph(std::locale)

checks if a character is clas s ied as uppercas e by a locale


(func tion template)

checks if a character is clas s ied as lowercas e by a locale


(func tion template)

checks if a character is clas s ied as alphabetic by a locale


(func tion template)

checks if a character is clas s ied as a digit by a locale


(func tion template)

checks if a character is clas s ied as punctuation by a locale


(func tion template)

checks if a character is clas s ied as a hexadecimal digit by a locale


(func tion template)

checks if a character is clas s ied as alphanumeric by a locale


(func tion template)

checks if a character is clas s ied as printable by a locale


(func tion template)

checks if a character is clas s ed as graphical by a locale


(func tion template)

Character conversions

toupper(std::locale)
tolower(std::locale)

converts a character to uppercas e us ing the ctype facet of a locale


(func tion template)

converts a character to lowercas e us ing the ctype facet of a locale


(func tion template)

String and stream conversions

wstring_convert(C++11)
wbuffer_convert(C++11)

performs convers ions between a wide s tring and a byte s tring


(c lass template)

performs convers ion between a byte s tream buer and a wide s tream
buer
(c lass template)

Facet category base classes

ctype_base
codecvt_base

denes character clas s ication categories


(c lass)

denes character convers ion errors


(c lass)

messages_base
time_base
money_base

denes mes s ages catalog type


(c lass)

denes date format cons tants


(c lass)

denes monetary formatting patterns


(c lass)

Facet categories

ctype
ctype<char>
codecvt
collate
messages
time_get

denes character clas s ication tables


(c lass template)

s pecialization of std::ctypefor type char


(c lass template spec ializ ation)

converts between character encodings , including UTF-8, UTF-16, UTF-32


(c lass template)

denes lexicographical comparis on and has hing of s trings


(c lass template)

implements retrieval of s trings from mes s age catalogs


(c lass template)

pars es time/date values from an input character s equence into


struct std::tm
(c lass template)

time_put
num_get
num_put
numpunct
money_get

formats contents of struct std::tm for output as character s equence


(c lass template)

pars es numeric values from an input character s equence


(c lass template)

formats numeric values for output as character s equence


(c lass template)

denes numeric punctuation rules


(c lass template)

pars es and cons tructs a monetary value from an input character


s equence
(c lass template)

money_put
moneypunct

formats a monetary value for output as a character s equence


(c lass template)

denes monetary formatting parameters us ed by std::money_getand


std::money_put
(c lass template)

Locale-specic facet categories

ctype_byname
codecvt_byname
messages_byname
collate_byname
time_get_byname
time_put_byname
numpunct_byname
moneypunct_byname

repres ents the s ys tem-s upplied std::ctypefor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::codecvtfor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::messagesfor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::collatefor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::time_getfor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::time_putfor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::numpunctfor the named locale


(c lass template)

repres ents the s ys tem-s upplied std::moneypunctfor the named locale


(c lass template)

Locale-independent unicode conversion facets


Dened in header <codecvt>

codecvt_utf8(C++11)
codecvt_utf16(C++11)

converts between UTF-8 and UCS2/UCS4


(c lass template)

converts between UTF-16 and UCS2/UCS4


(c lass template)

converts between UTF-8 and UTF-16


codecvt_utf8_utf16(C++11) (c lass template)
tags to alter behavior of the s tandard codecvt facets
codecvt_mode(C++11)
(enum)

C library locales
Dened in header <clocale>

setlocale

gets and s ets the current C locale


(func tion)

LC_ALL
LC_COLLATE
LC_CTYPE
locale categories for std::setlocale
LC_MONETARY (mac ro c onstant)
LC_NUMERIC
LC_TIME
queries numeric and monetary formatting details of the current locale
localeconv (func tion)
lconv

formatting details , returned by std::localeconv


(c lass)

See also
C documentation for Localization support
Retrieved from "http://en.c ppreferenc e.c om/mwiki/index.php?title=c pp/loc ale& oldid=71006"

You might also like