#include <cstddef>
#include "unicode/utypes.h"
#include "unicode/ustring.h"
#include "unicode/unistr.h"
#include "unicode/chariter.h"
#include "unicode/utext.h"
#include "unicode/utf.h"
#include "unicode/utf8.h"
#include "unicode/utf16.h"
#include "ustr_imp.h"
#include "cmemory.h"
#include "cstring.h"
#include "uassert.h"
#include "putilimp.h"
U_NAMESPACE_USE
#define I32_FLAG(bitIndex) …
static UBool
utext_access(UText *ut, int64_t index, UBool forward) { … }
U_CAPI UBool U_EXPORT2
utext_moveIndex32(UText *ut, int32_t delta) { … }
U_CAPI int64_t U_EXPORT2
utext_nativeLength(UText *ut) { … }
U_CAPI UBool U_EXPORT2
utext_isLengthExpensive(const UText *ut) { … }
U_CAPI int64_t U_EXPORT2
utext_getNativeIndex(const UText *ut) { … }
U_CAPI void U_EXPORT2
utext_setNativeIndex(UText *ut, int64_t index) { … }
U_CAPI int64_t U_EXPORT2
utext_getPreviousNativeIndex(UText *ut) { … }
U_CAPI UChar32 U_EXPORT2
utext_current32(UText *ut) { … }
U_CAPI UChar32 U_EXPORT2
utext_char32At(UText *ut, int64_t nativeIndex) { … }
U_CAPI UChar32 U_EXPORT2
utext_next32(UText *ut) { … }
U_CAPI UChar32 U_EXPORT2
utext_previous32(UText *ut) { … }
U_CAPI UChar32 U_EXPORT2
utext_next32From(UText *ut, int64_t index) { … }
U_CAPI UChar32 U_EXPORT2
utext_previous32From(UText *ut, int64_t index) { … }
U_CAPI int32_t U_EXPORT2
utext_extract(UText *ut,
int64_t start, int64_t limit,
char16_t *dest, int32_t destCapacity,
UErrorCode *status) { … }
U_CAPI UBool U_EXPORT2
utext_equals(const UText *a, const UText *b) { … }
U_CAPI UBool U_EXPORT2
utext_isWritable(const UText *ut)
{ … }
U_CAPI void U_EXPORT2
utext_freeze(UText *ut) { … }
U_CAPI UBool U_EXPORT2
utext_hasMetaData(const UText *ut)
{ … }
U_CAPI int32_t U_EXPORT2
utext_replace(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
const char16_t *replacementText, int32_t replacementLength,
UErrorCode *status)
{ … }
U_CAPI void U_EXPORT2
utext_copy(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
int64_t destIndex,
UBool move,
UErrorCode *status)
{ … }
U_CAPI UText * U_EXPORT2
utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status) { … }
enum { … };
struct ExtendedUText { … };
static const UText emptyText = …;
U_CAPI UText * U_EXPORT2
utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) { … }
U_CAPI UText * U_EXPORT2
utext_close(UText *ut) { … }
static void
invalidateChunk(UText *ut) { … }
static int32_t
pinIndex(int64_t &index, int64_t limit) { … }
U_CDECL_BEGIN
static void adjustPointer(UText *dest, const void **destPtr, const UText *src) { … }
static UText * U_CALLCONV
shallowTextClone(UText * dest, const UText * src, UErrorCode * status) { … }
U_CDECL_END
enum { … };
struct UTF8Buf { … };
U_CDECL_BEGIN
static int64_t U_CALLCONV
utf8TextLength(UText *ut) { … }
static UBool U_CALLCONV
utf8TextAccess(UText *ut, int64_t index, UBool forward) { … }
static char16_t*
utext_strFromUTF8(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const char* src,
int32_t srcLength,
UErrorCode *pErrorCode
)
{ … }
static int32_t U_CALLCONV
utf8TextExtract(UText *ut,
int64_t start, int64_t limit,
char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) { … }
static int64_t U_CALLCONV
utf8TextMapOffsetToNative(const UText *ut) { … }
static int32_t U_CALLCONV
utf8TextMapIndexToUTF16(const UText *ut, int64_t index64) { … }
static UText * U_CALLCONV
utf8TextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status)
{ … }
static void U_CALLCONV
utf8TextClose(UText *ut) { … }
U_CDECL_END
static const struct UTextFuncs utf8Funcs = …;
static const char gEmptyString[] = …;
U_CAPI UText * U_EXPORT2
utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status) { … }
enum { … };
struct ReplExtra { … };
U_CDECL_BEGIN
static UText * U_CALLCONV
repTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status) { … }
static void U_CALLCONV
repTextClose(UText *ut) { … }
static int64_t U_CALLCONV
repTextLength(UText *ut) { … }
static UBool U_CALLCONV
repTextAccess(UText *ut, int64_t index, UBool forward) { … }
static int32_t U_CALLCONV
repTextExtract(UText *ut,
int64_t start, int64_t limit,
char16_t *dest, int32_t destCapacity,
UErrorCode *status) { … }
static int32_t U_CALLCONV
repTextReplace(UText *ut,
int64_t start, int64_t limit,
const char16_t *src, int32_t length,
UErrorCode *status) { … }
static void U_CALLCONV
repTextCopy(UText *ut,
int64_t start, int64_t limit,
int64_t destIndex,
UBool move,
UErrorCode *status)
{ … }
static const struct UTextFuncs repFuncs = …;
U_CAPI UText * U_EXPORT2
utext_openReplaceable(UText *ut, Replaceable *rep, UErrorCode *status)
{ … }
U_CDECL_END
U_CDECL_BEGIN
static UText * U_CALLCONV
unistrTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status) { … }
static void U_CALLCONV
unistrTextClose(UText *ut) { … }
static int64_t U_CALLCONV
unistrTextLength(UText *t) { … }
static UBool U_CALLCONV
unistrTextAccess(UText *ut, int64_t index, UBool forward) { … }
static int32_t U_CALLCONV
unistrTextExtract(UText *t,
int64_t start, int64_t limit,
char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) { … }
static int32_t U_CALLCONV
unistrTextReplace(UText *ut,
int64_t start, int64_t limit,
const char16_t *src, int32_t length,
UErrorCode *pErrorCode) { … }
static void U_CALLCONV
unistrTextCopy(UText *ut,
int64_t start, int64_t limit,
int64_t destIndex,
UBool move,
UErrorCode *pErrorCode) { … }
static const struct UTextFuncs unistrFuncs = …;
U_CDECL_END
U_CAPI UText * U_EXPORT2
utext_openUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status) { … }
U_CAPI UText * U_EXPORT2
utext_openConstUnicodeString(UText *ut, const UnicodeString *s, UErrorCode *status) { … }
U_CDECL_BEGIN
static UText * U_CALLCONV
ucstrTextClone(UText *dest, const UText * src, UBool deep, UErrorCode * status) { … }
static void U_CALLCONV
ucstrTextClose(UText *ut) { … }
static int64_t U_CALLCONV
ucstrTextLength(UText *ut) { … }
static UBool U_CALLCONV
ucstrTextAccess(UText *ut, int64_t index, UBool forward) { … }
static int32_t U_CALLCONV
ucstrTextExtract(UText *ut,
int64_t start, int64_t limit,
char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode)
{ … }
static const struct UTextFuncs ucstrFuncs = …;
U_CDECL_END
static const char16_t gEmptyUString[] = …;
U_CAPI UText * U_EXPORT2
utext_openUChars(UText *ut, const char16_t *s, int64_t length, UErrorCode *status) { … }
#define CIBufSize …
U_CDECL_BEGIN
static void U_CALLCONV
charIterTextClose(UText *ut) { … }
static int64_t U_CALLCONV
charIterTextLength(UText *ut) { … }
static UBool U_CALLCONV
charIterTextAccess(UText *ut, int64_t index, UBool forward) { … }
static UText * U_CALLCONV
charIterTextClone(UText *dest, const UText *src, UBool deep, UErrorCode * status) { … }
static int32_t U_CALLCONV
charIterTextExtract(UText *ut,
int64_t start, int64_t limit,
char16_t *dest, int32_t destCapacity,
UErrorCode *status)
{ … }
static const struct UTextFuncs charIterFuncs = …;
U_CDECL_END
U_CAPI UText * U_EXPORT2
utext_openCharacterIterator(UText *ut, CharacterIterator *ci, UErrorCode *status) { … }