ICU 77.1  77.1
ulocale.h
Go to the documentation of this file.
1 // © 2023 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 
4 #ifndef ULOCALE_H
5 #define ULOCALE_H
6 
7 #include "unicode/localpointer.h"
8 #include "unicode/uenum.h"
9 #include "unicode/utypes.h"
10 
20 struct ULocale;
21 
26 typedef struct ULocale ULocale;
27 
41 U_CAPI ULocale* U_EXPORT2
42 ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err);
43 
57 U_CAPI ULocale* U_EXPORT2
58 ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err);
59 
66 U_CAPI void U_EXPORT2
68 
76 U_CAPI const char* U_EXPORT2
78 
86 U_CAPI const char* U_EXPORT2
87 ulocale_getScript(const ULocale* locale);
88 
96 U_CAPI const char* U_EXPORT2
97 ulocale_getRegion(const ULocale* locale);
98 
106 U_CAPI const char* U_EXPORT2
108 
119 U_CAPI const char* U_EXPORT2
121 
130 U_CAPI const char* U_EXPORT2
132 
140 U_CAPI bool U_EXPORT2
141 ulocale_isBogus(const ULocale* locale);
142 
152 U_CAPI UEnumeration* U_EXPORT2
154 
164 U_CAPI UEnumeration* U_EXPORT2
166 
182 U_CAPI int32_t U_EXPORT2
184  const ULocale* locale, const char* keyword, int32_t keywordLength,
185  char* valueBuffer, int32_t valueBufferCapacity, UErrorCode *err);
186 
202 U_CAPI int32_t U_EXPORT2
204  const ULocale* locale, const char* keyword, int32_t keywordLength,
205  char* valueBuffer, int32_t valueBufferCapacity, UErrorCode *err);
206 
207 #if U_SHOW_CPLUSPLUS_API
208 
209 U_NAMESPACE_BEGIN
210 
221 
222 U_NAMESPACE_END
223 
224 #endif /* U_SHOW_CPLUSPLUS_API */
225 
226 #endif /*_ULOCALE */
"Smart pointer" class, closes a ULocale via ulocale_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:550