#include <algorithm>
#include <optional>
#include <string_view>
#include "unicode/utypes.h"
#include "unicode/unistr.h"
#include "unicode/uobject.h"
#include "charstr.h"
#include "cmemory.h"
#include "cstring.h"
#include "uassert.h"
#include "ucln_cmn.h"
#include "uhash.h"
#include "ulocimp.h"
#include "umutex.h"
#include "uresimp.h"
#include "uvector.h"
#include "udataswp.h"
static UHashtable* gLocExtKeyMap = …;
static icu::UInitOnce gLocExtKeyMapInitOnce { … };
SpecialType;
struct LocExtKeyData : public icu::UMemory { … };
struct LocExtType : public icu::UMemory { … };
struct TypeAlias : public icu::UMemory { … };
static icu::MemoryPool<icu::CharString>* gKeyTypeStringPool = …;
static icu::MemoryPool<LocExtKeyData>* gLocExtKeyDataEntries = …;
static icu::MemoryPool<LocExtType>* gLocExtTypeEntries = …;
static icu::MemoryPool<TypeAlias>* gTypeAliasEntries = …;
U_CDECL_BEGIN
static UBool U_CALLCONV
uloc_key_type_cleanup() { … }
U_CDECL_END
namespace {
void U_CALLCONV
initFromResourceBundle(UErrorCode& sts) { … }
bool
init() { … }
bool
isSpecialTypeCodepoints(std::string_view val) { … }
bool
isSpecialTypeReorderCode(std::string_view val) { … }
bool
isSpecialTypeRgKeyValue(std::string_view val) { … }
}
U_EXPORT std::optional<std::string_view>
ulocimp_toBcpKey(std::string_view key) { … }
U_EXPORT std::optional<std::string_view>
ulocimp_toLegacyKey(std::string_view key) { … }
U_EXPORT std::optional<std::string_view>
ulocimp_toBcpType(std::string_view key, std::string_view type) { … }
U_EXPORT std::optional<std::string_view>
ulocimp_toLegacyType(std::string_view key, std::string_view type) { … }