#include "unicode/utypes.h"
#include "unicode/putil.h"
#include "unicode/uchar.h"
#include "unicode/ustring.h"
#include "unicode/utf16.h"
#include "cstring.h"
#include "cwchar.h"
#include "cmemory.h"
#include "ustr_imp.h"
#define U_BMP_MAX …
static inline UBool
isMatchAtCPBoundary(const char16_t *start, const char16_t *match, const char16_t *matchLimit, const char16_t *limit) { … }
U_CAPI char16_t * U_EXPORT2
u_strFindFirst(const char16_t *s, int32_t length,
const char16_t *sub, int32_t subLength) { … }
U_CAPI char16_t * U_EXPORT2
u_strstr(const char16_t *s, const char16_t *substring) { … }
U_CAPI char16_t * U_EXPORT2
u_strchr(const char16_t *s, char16_t c) { … }
U_CAPI char16_t * U_EXPORT2
u_strchr32(const char16_t *s, UChar32 c) { … }
U_CAPI char16_t * U_EXPORT2
u_memchr(const char16_t *s, char16_t c, int32_t count) { … }
U_CAPI char16_t * U_EXPORT2
u_memchr32(const char16_t *s, UChar32 c, int32_t count) { … }
U_CAPI char16_t * U_EXPORT2
u_strFindLast(const char16_t *s, int32_t length,
const char16_t *sub, int32_t subLength) { … }
U_CAPI char16_t * U_EXPORT2
u_strrstr(const char16_t *s, const char16_t *substring) { … }
U_CAPI char16_t * U_EXPORT2
u_strrchr(const char16_t *s, char16_t c) { … }
U_CAPI char16_t * U_EXPORT2
u_strrchr32(const char16_t *s, UChar32 c) { … }
U_CAPI char16_t * U_EXPORT2
u_memrchr(const char16_t *s, char16_t c, int32_t count) { … }
U_CAPI char16_t * U_EXPORT2
u_memrchr32(const char16_t *s, UChar32 c, int32_t count) { … }
static int32_t
_matchFromSet(const char16_t *string, const char16_t *matchSet, UBool polarity) { … }
U_CAPI char16_t * U_EXPORT2
u_strpbrk(const char16_t *string, const char16_t *matchSet)
{ … }
U_CAPI int32_t U_EXPORT2
u_strcspn(const char16_t *string, const char16_t *matchSet)
{ … }
U_CAPI int32_t U_EXPORT2
u_strspn(const char16_t *string, const char16_t *matchSet)
{ … }
U_CAPI char16_t* U_EXPORT2
u_strtok_r(char16_t *src,
const char16_t *delim,
char16_t **saveState)
{ … }
U_CAPI char16_t* U_EXPORT2
u_strcat(char16_t *dst,
const char16_t *src)
{ … }
U_CAPI char16_t* U_EXPORT2
u_strncat(char16_t *dst,
const char16_t *src,
int32_t n )
{ … }
U_CAPI int32_t U_EXPORT2
u_strcmp(const char16_t *s1,
const char16_t *s2)
{ … }
U_CFUNC int32_t U_EXPORT2
uprv_strCompare(const char16_t *s1, int32_t length1,
const char16_t *s2, int32_t length2,
UBool strncmpStyle, UBool codePointOrder) { … }
U_CAPI int32_t U_EXPORT2
u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder) { … }
#if 0
void fragment {
if(c1<=0xdbff) {
if(!U16_IS_TRAIL(iter1->current(iter1))) {
c1-=0x2800;
}
} else if(c1<=0xdfff) {
int32_t idx=iter1->getIndex(iter1, UITER_CURRENT);
iter1->previous(iter1);
if(!U16_IS_LEAD(iter1->previous(iter1))) {
c1-=0x2800;
}
iter1->move(iter1, idx, UITER_ZERO);
} else {
c1-=0x2800;
}
}
#endif
U_CAPI int32_t U_EXPORT2
u_strCompare(const char16_t *s1, int32_t length1,
const char16_t *s2, int32_t length2,
UBool codePointOrder) { … }
U_CAPI int32_t U_EXPORT2
u_strcmpCodePointOrder(const char16_t *s1, const char16_t *s2) { … }
U_CAPI int32_t U_EXPORT2
u_strncmp(const char16_t *s1,
const char16_t *s2,
int32_t n)
{ … }
U_CAPI int32_t U_EXPORT2
u_strncmpCodePointOrder(const char16_t *s1, const char16_t *s2, int32_t n) { … }
U_CAPI char16_t* U_EXPORT2
u_strcpy(char16_t *dst,
const char16_t *src)
{ … }
U_CAPI char16_t* U_EXPORT2
u_strncpy(char16_t *dst,
const char16_t *src,
int32_t n)
{ … }
U_CAPI int32_t U_EXPORT2
u_strlen(const char16_t *s)
{ … }
U_CAPI int32_t U_EXPORT2
u_countChar32(const char16_t *s, int32_t length) { … }
U_CAPI UBool U_EXPORT2
u_strHasMoreChar32Than(const char16_t *s, int32_t length, int32_t number) { … }
U_CAPI char16_t * U_EXPORT2
u_memcpy(char16_t *dest, const char16_t *src, int32_t count) { … }
U_CAPI char16_t * U_EXPORT2
u_memmove(char16_t *dest, const char16_t *src, int32_t count) { … }
U_CAPI char16_t * U_EXPORT2
u_memset(char16_t *dest, char16_t c, int32_t count) { … }
U_CAPI int32_t U_EXPORT2
u_memcmp(const char16_t *buf1, const char16_t *buf2, int32_t count) { … }
U_CAPI int32_t U_EXPORT2
u_memcmpCodePointOrder(const char16_t *s1, const char16_t *s2, int32_t count) { … }
static const char16_t UNESCAPE_MAP[] = …;
enum { … };
static int32_t _digit8(char16_t c) { … }
static int32_t _digit16(char16_t c) { … }
U_CAPI UChar32 U_EXPORT2
u_unescapeAt(UNESCAPE_CHAR_AT charAt,
int32_t *offset,
int32_t length,
void *context) { … }
static char16_t U_CALLCONV
_charPtr_charAt(int32_t offset, void *context) { … }
static void _appendUChars(char16_t *dest, int32_t destCapacity,
const char *src, int32_t srcLen) { … }
U_CAPI int32_t U_EXPORT2
u_unescape(const char *src, char16_t *dest, int32_t destCapacity) { … }
#define __TERMINATE_STRING(dest, destCapacity, length, pErrorCode) …
U_CAPI char16_t U_EXPORT2
u_asciiToUpper(char16_t c) { … }
U_CAPI int32_t U_EXPORT2
u_terminateUChars(char16_t *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
u_terminateChars(char *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
u_terminateUChar32s(UChar32 *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
u_terminateWChars(wchar_t *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) { … }
#define STRING_HASH(TYPE, STR, STRLEN, DEREF) …
U_CAPI int32_t U_EXPORT2
ustr_hashUCharsN(const char16_t *str, int32_t length) { … }
U_CAPI int32_t U_EXPORT2
ustr_hashCharsN(const char *str, int32_t length) { … }
U_CAPI int32_t U_EXPORT2
ustr_hashICharsN(const char *str, int32_t length) { … }