3#ifndef __LOCALEBUILDER_H__
4#define __LOCALEBUILDER_H__
8#if U_SHOW_CPLUSPLUS_API
300 CharString *variant_;
LocaleBuilder is used to build instances of Locale from values configured by the setters.
LocaleBuilder & setLanguageTag(StringPiece tag)
Resets the LocaleBuilder to match the provided IETF BCP 47 language tag.
LocaleBuilder & setScript(StringPiece script)
Sets the script.
LocaleBuilder & setUnicodeLocaleKeyword(StringPiece key, StringPiece type)
Sets the Unicode locale keyword type for the given key.
LocaleBuilder & setExtension(char key, StringPiece value)
Sets the extension for the given key.
Locale build(UErrorCode &status)
Returns an instance of Locale created from the fields set on this builder.
LocaleBuilder & clear()
Resets the builder to its initial, empty state.
LocaleBuilder & setLocale(const Locale &locale)
Resets the LocaleBuilder to match the provided locale.
UBool copyErrorTo(UErrorCode &outErrorCode) const
Sets the UErrorCode if an error occurred while recording sets.
virtual ~LocaleBuilder()
Destructor.
LocaleBuilder & addUnicodeLocaleAttribute(StringPiece attribute)
Adds a unicode locale attribute, if not already present, otherwise has no effect.
LocaleBuilder()
Constructs an empty LocaleBuilder.
LocaleBuilder & removeUnicodeLocaleAttribute(StringPiece attribute)
Removes a unicode locale attribute, if present, otherwise has no effect.
LocaleBuilder & setVariant(StringPiece variant)
Sets the variant.
LocaleBuilder & setLanguage(StringPiece language)
Sets the language.
LocaleBuilder & clearExtensions()
Resets the extensions to their initial, empty state.
LocaleBuilder & setRegion(StringPiece region)
Sets the region.
Data for the best-matching pair of a desired and a supported locale.
A Locale object represents a specific geographical, political, or cultural region.
A string-like object that points to a sized piece of memory.
UObject is the common ICU "boilerplate" class.
C++ API: Locale matcher: User's desired locales vs.
C++ API: Locale ID object.
C++ API: StringPiece: Read-only byte string wrapper class.
int8_t UBool
The ICU boolean type, a signed-byte integer.
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.