#include "unicode/utypes.h"
#include "unicode/brkiter.h"
#include "unicode/casemap.h"
#include "unicode/edits.h"
#include "unicode/stringoptions.h"
#include "unicode/ustring.h"
#include "unicode/ucasemap.h"
#include "unicode/ubrk.h"
#include "unicode/utf.h"
#include "unicode/utf16.h"
#include "cmemory.h"
#include "ucase.h"
#include "ucasemap_imp.h"
#include "ustr_imp.h"
#include "uassert.h"
#define ACUTE …
U_NAMESPACE_BEGIN
namespace {
int32_t checkOverflowAndEditsError(int32_t destIndex, int32_t destCapacity,
Edits *edits, UErrorCode &errorCode) { … }
inline int32_t
appendResult(char16_t *dest, int32_t destIndex, int32_t destCapacity,
int32_t result, const char16_t *s,
int32_t cpLength, uint32_t options, icu::Edits *edits) { … }
inline int32_t
appendUChar(char16_t *dest, int32_t destIndex, int32_t destCapacity, char16_t c) { … }
int32_t
appendNonEmptyUnchanged(char16_t *dest, int32_t destIndex, int32_t destCapacity,
const char16_t *s, int32_t length, uint32_t options, icu::Edits *edits) { … }
inline int32_t
appendUnchanged(char16_t *dest, int32_t destIndex, int32_t destCapacity,
const char16_t *s, int32_t length, uint32_t options, icu::Edits *edits) { … }
UChar32 U_CALLCONV
utf16_caseContextIterator(void *context, int8_t dir) { … }
int32_t toLower(int32_t caseLocale, uint32_t options,
char16_t *dest, int32_t destCapacity,
const char16_t *src, UCaseContext *csc, int32_t srcStart, int32_t srcLimit,
icu::Edits *edits, UErrorCode &errorCode) { … }
int32_t toUpper(int32_t caseLocale, uint32_t options,
char16_t *dest, int32_t destCapacity,
const char16_t *src, UCaseContext *csc, int32_t srcLength,
icu::Edits *edits, UErrorCode &errorCode) { … }
}
U_NAMESPACE_END
U_NAMESPACE_USE
#if !UCONFIG_NO_BREAK_ITERATION
namespace {
int32_t maybeTitleDutchIJ(const char16_t *src, UChar32 c, int32_t start, int32_t segmentLimit,
char16_t *dest, int32_t &destIndex, int32_t destCapacity, uint32_t options,
icu::Edits *edits) { … }
}
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *iter,
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) { … }
#endif
U_NAMESPACE_BEGIN
namespace GreekUpper {
static const uint16_t data0370[] = …;
static const uint16_t data1F00[] = …;
static const uint16_t data2126 = …;
uint32_t getLetterData(UChar32 c) { … }
uint32_t getDiacriticData(UChar32 c) { … }
UBool isFollowedByCasedLetter(const char16_t *s, int32_t i, int32_t length) { … }
int32_t toUpper(uint32_t options,
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
Edits *edits,
UErrorCode &errorCode) { … }
}
U_NAMESPACE_END
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToLower(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_UNUSED
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) { … }
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToUpper(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_UNUSED
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) { … }
U_CFUNC int32_t U_CALLCONV
ustrcase_internalFold(int32_t , uint32_t options, UCASEMAP_BREAK_ITERATOR_UNUSED
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) { … }
U_CFUNC int32_t
ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
UStringCaseMapper *stringCaseMapper,
icu::Edits *edits,
UErrorCode &errorCode) { … }
U_CFUNC int32_t
ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
UStringCaseMapper *stringCaseMapper,
UErrorCode &errorCode) { … }
U_CAPI int32_t U_EXPORT2
u_strFoldCase(char16_t *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
uint32_t options,
UErrorCode *pErrorCode) { … }
U_NAMESPACE_BEGIN
int32_t CaseMap::fold(
uint32_t options,
const char16_t *src, int32_t srcLength,
char16_t *dest, int32_t destCapacity, Edits *edits,
UErrorCode &errorCode) { … }
U_NAMESPACE_END
struct CmpEquivLevel { … };
CmpEquivLevel;
static int32_t _cmpFold(
const char16_t *s1, int32_t length1,
const char16_t *s2, int32_t length2,
uint32_t options,
int32_t *matchLen1, int32_t *matchLen2,
UErrorCode *pErrorCode) { … }
U_CFUNC int32_t
u_strcmpFold(const char16_t *s1, int32_t length1,
const char16_t *s2, int32_t length2,
uint32_t options,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
u_strCaseCompare(const char16_t *s1, int32_t length1,
const char16_t *s2, int32_t length2,
uint32_t options,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
u_strcasecmp(const char16_t *s1, const char16_t *s2, uint32_t options) { … }
U_CAPI int32_t U_EXPORT2
u_memcasecmp(const char16_t *s1, const char16_t *s2, int32_t length, uint32_t options) { … }
U_CAPI int32_t U_EXPORT2
u_strncasecmp(const char16_t *s1, const char16_t *s2, int32_t n, uint32_t options) { … }
U_CAPI void
u_caseInsensitivePrefixMatch(const char16_t *s1, int32_t length1,
const char16_t *s2, int32_t length2,
uint32_t options,
int32_t *matchLen1, int32_t *matchLen2,
UErrorCode *pErrorCode) { … }