#include <utility>
#include "unicode/utypes.h"
#include "unicode/bytestrie.h"
#include "unicode/localpointer.h"
#include "unicode/locid.h"
#include "unicode/uobject.h"
#include "unicode/ures.h"
#include "unicode/uscript.h"
#include "charstr.h"
#include "cstring.h"
#include "loclikelysubtags.h"
#include "lsr.h"
#include "uassert.h"
#include "ucln_cmn.h"
#include "uhash.h"
#include "uinvchar.h"
#include "umutex.h"
#include "uniquecharstr.h"
#include "uresdata.h"
#include "uresimp.h"
#include "uvector.h"
U_NAMESPACE_BEGIN
namespace {
constexpr char PSEUDO_ACCENTS_PREFIX = …;
constexpr char PSEUDO_BIDI_PREFIX = …;
constexpr char PSEUDO_CRACKED_PREFIX = …;
}
LocaleDistanceData::LocaleDistanceData(LocaleDistanceData &&data) : … { … }
LocaleDistanceData::~LocaleDistanceData() { … }
struct XLikelySubtagsData { … };
namespace {
XLikelySubtags *gLikelySubtags = …;
UVector *gMacroregions = …;
UInitOnce gInitOnce { … };
UBool U_CALLCONV cleanup() { … }
static const char16_t RANGE_MARKER = …;
UVector* loadMacroregions(UErrorCode &status) { … }
}
void U_CALLCONV XLikelySubtags::initLikelySubtags(UErrorCode &errorCode) { … }
const XLikelySubtags *XLikelySubtags::getSingleton(UErrorCode &errorCode) { … }
XLikelySubtags::XLikelySubtags(XLikelySubtagsData &data) : … { … }
XLikelySubtags::~XLikelySubtags() { … }
LSR XLikelySubtags::makeMaximizedLsrFrom(const Locale &locale,
bool returnInputIfUnmatch,
UErrorCode &errorCode) const { … }
namespace {
const char *getCanonical(const CharStringMap &aliases, const char *alias) { … }
}
LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, const char *region,
const char *variant,
bool returnInputIfUnmatch,
UErrorCode &errorCode) const { … }
LSR XLikelySubtags::maximize(const char *language, const char *script, const char *region,
bool returnInputIfUnmatch,
UErrorCode &errorCode) const { … }
bool XLikelySubtags::isMacroregion(StringPiece& region, UErrorCode& errorCode) const { … }
LSR XLikelySubtags::maximize(StringPiece language, StringPiece script, StringPiece region,
bool returnInputIfUnmatch,
UErrorCode &errorCode) const { … }
int32_t XLikelySubtags::compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const { … }
int32_t XLikelySubtags::getLikelyIndex(const char *language, const char *script) const { … }
int32_t XLikelySubtags::trieNext(BytesTrie &iter, const char *s, int32_t i) { … }
int32_t XLikelySubtags::trieNext(BytesTrie &iter, StringPiece s, int32_t i) { … }
LSR XLikelySubtags::minimizeSubtags(StringPiece language, StringPiece script,
StringPiece region,
bool favorScript,
UErrorCode &errorCode) const { … }
U_NAMESPACE_END