xref: /aosp_15_r20/external/icu/icu4c/source/common/locutil.h (revision 0e209d3975ff4a8c132096b14b0e9364a753506e)
1*0e209d39SAndroid Build Coastguard Worker // © 2016 and later: Unicode, Inc. and others.
2*0e209d39SAndroid Build Coastguard Worker // License & terms of use: http://www.unicode.org/copyright.html
3*0e209d39SAndroid Build Coastguard Worker /**
4*0e209d39SAndroid Build Coastguard Worker  *******************************************************************************
5*0e209d39SAndroid Build Coastguard Worker  * Copyright (C) 2002-2005, International Business Machines Corporation and    *
6*0e209d39SAndroid Build Coastguard Worker  * others. All Rights Reserved.                                                *
7*0e209d39SAndroid Build Coastguard Worker  *******************************************************************************
8*0e209d39SAndroid Build Coastguard Worker  *
9*0e209d39SAndroid Build Coastguard Worker  *******************************************************************************
10*0e209d39SAndroid Build Coastguard Worker  */
11*0e209d39SAndroid Build Coastguard Worker #ifndef LOCUTIL_H
12*0e209d39SAndroid Build Coastguard Worker #define LOCUTIL_H
13*0e209d39SAndroid Build Coastguard Worker 
14*0e209d39SAndroid Build Coastguard Worker #include "unicode/utypes.h"
15*0e209d39SAndroid Build Coastguard Worker #include "hash.h"
16*0e209d39SAndroid Build Coastguard Worker 
17*0e209d39SAndroid Build Coastguard Worker #if !UCONFIG_NO_SERVICE || !UCONFIG_NO_TRANSLITERATION
18*0e209d39SAndroid Build Coastguard Worker 
19*0e209d39SAndroid Build Coastguard Worker 
20*0e209d39SAndroid Build Coastguard Worker U_NAMESPACE_BEGIN
21*0e209d39SAndroid Build Coastguard Worker 
22*0e209d39SAndroid Build Coastguard Worker // temporary utility functions, till I know where to find them
23*0e209d39SAndroid Build Coastguard Worker // in header so tests can also access them
24*0e209d39SAndroid Build Coastguard Worker 
25*0e209d39SAndroid Build Coastguard Worker class U_COMMON_API LocaleUtility {
26*0e209d39SAndroid Build Coastguard Worker public:
27*0e209d39SAndroid Build Coastguard Worker   static UnicodeString& canonicalLocaleString(const UnicodeString* id, UnicodeString& result);
28*0e209d39SAndroid Build Coastguard Worker   static Locale& initLocaleFromName(const UnicodeString& id, Locale& result);
29*0e209d39SAndroid Build Coastguard Worker   static UnicodeString& initNameFromLocale(const Locale& locale, UnicodeString& result);
30*0e209d39SAndroid Build Coastguard Worker   static const Hashtable* getAvailableLocaleNames(const UnicodeString& bundleID);
31*0e209d39SAndroid Build Coastguard Worker   static bool isFallbackOf(const UnicodeString& root, const UnicodeString& child);
32*0e209d39SAndroid Build Coastguard Worker };
33*0e209d39SAndroid Build Coastguard Worker 
34*0e209d39SAndroid Build Coastguard Worker U_NAMESPACE_END
35*0e209d39SAndroid Build Coastguard Worker 
36*0e209d39SAndroid Build Coastguard Worker 
37*0e209d39SAndroid Build Coastguard Worker #endif
38*0e209d39SAndroid Build Coastguard Worker 
39*0e209d39SAndroid Build Coastguard Worker #endif
40