263 Locale(
const char * language,
264 const char * country = 0,
265 const char * variant = 0,
266 const char * keywordsAndValues = 0);
382 inline const char * getLanguage( )
const;
391 inline const char * getScript( )
const;
398 inline const char * getCountry( )
const;
405 inline const char * getVariant( )
const;
415 inline const char * getName()
const;
424 const char * getBaseName()
const;
448 int32_t getKeywordValue(
const char* keywordName,
char *buffer, int32_t bufferCapacity,
UErrorCode &status)
const;
461 void setKeywordValue(
const char* keywordName,
const char* keywordValue,
UErrorCode &status);
469 const char * getISO3Language()
const;
476 const char * getISO3Country()
const;
485 uint32_t getLCID(
void)
const;
622 int32_t hashCode(
void)
const;
639 UBool isBogus(
void)
const;
659 static const char*
const*
U_EXPORT2 getISOCountries();
669 static const char*
const*
U_EXPORT2 getISOLanguages();
690 void setFromPOSIXID(
const char *posixID);
700 Locale& init(
const char* cLocaleID,
UBool canonicalize);
715 static Locale *getLocaleCache(
void);
720 int32_t variantBegin;
729 static const Locale &getLocale(
int locid);
735 friend Locale *locale_set_default_internal(
const char *,
UErrorCode& status);
766 return &baseName[variantBegin];
const char * getVariant() const
Returns the locale's variant code.
UBool isBogus(void) const
Gets the bogus state.
#define ULOC_LANG_CAPACITY
Useful constant for the maximum size of the language part of a locale ID.
const char * getLanguage() const
Returns the locale's ISO-639 language code.
const char * getScript() const
Returns the locale's ISO-15924 abbreviation script code.
#define ULOC_COUNTRY_CAPACITY
Useful constant for the maximum size of the country part of a locale ID (including the terminating NU...
const char * getName() const
Returns the programmatic name of the entire locale, with the language, country and variant separated ...
#define ULOC_FULLNAME_CAPACITY
Useful constant for the maximum size of the whole locale ID (including the terminating NULL and all k...
#define ULOC_SCRIPT_CAPACITY
Useful constant for the maximum size of the script part of a locale ID (including the terminating NUL...
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
C API: Platform Utilities.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UBool operator!=(const Locale &other) const
Checks if two locale keys are not the same.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UObject is the common ICU "boilerplate" class.
UBool operator==(const Locale &other) const
Checks if two locale keys are the same.
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Base class for 'pure' C++ implementations of uenum api.
C++ API: String Enumeration.
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
const char * getBaseName() const
Returns the programmatic name of the entire locale as getName would return, but without keywords...
A Locale object represents a specific geographical, political, or cultural region.
const char * getCountry() const
Returns the locale's ISO-3166 country code.
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
int8_t UBool
The ICU boolean type.