utext.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
* Copyright (C) 2004-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: utext.h
* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
* created on: 2004oct06
* created by: Markus W. Scherer
*/
#ifndef __UTEXT_H__
#define __UTEXT_H__
#include "unicode/utypes.h"
#include "unicode/uchar.h"
#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
#include "unicode/rep.h"
#include "unicode/unistr.h"
#include "unicode/chariter.h"
#endif
U_CDECL_BEGIN
struct UText;
typedef struct UText UText;
/***************************************************************************************
*
* C Functions for creating UText wrappers around various kinds of text strings.
*
****************************************************************************************/
U_CAPI UText * U_EXPORT2
utext_close(UText *ut);
U_CAPI UText * U_EXPORT2
utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status);
U_CAPI UText * U_EXPORT2
utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status);
#if U_SHOW_CPLUSPLUS_API
U_CAPI UText * U_EXPORT2
utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status);
U_CAPI UText * U_EXPORT2
utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode *status);
U_CAPI UText * U_EXPORT2
utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status);
U_CAPI UText * U_EXPORT2
utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *status);
#endif
U_CAPI UText * U_EXPORT2
utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status);
U_CAPI UBool U_EXPORT2
utext_equals(const UText *a, const UText *b);
/*****************************************************************************
*
* Functions to work with the text represented by a UText wrapper
*
*****************************************************************************/
U_CAPI int64_t U_EXPORT2
utext_nativeLength(UText *ut);
U_CAPI UBool U_EXPORT2
utext_isLengthExpensive(const UText *ut);
U_CAPI UChar32 U_EXPORT2
utext_char32At(UText *ut, int64_t nativeIndex);
U_CAPI UChar32 U_EXPORT2
utext_current32(UText *ut);
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 nativeIndex);
U_CAPI UChar32 U_EXPORT2
utext_previous32From(UText *ut, int64_t nativeIndex);
U_CAPI int64_t U_EXPORT2
utext_getNativeIndex(const UText *ut);
U_CAPI void U_EXPORT2
utext_setNativeIndex(UText *ut, int64_t nativeIndex);
U_CAPI UBool U_EXPORT2
utext_moveIndex32(UText *ut, int32_t delta);
U_CAPI int64_t U_EXPORT2
utext_getPreviousNativeIndex(UText *ut);
U_CAPI int32_t U_EXPORT2
utext_extract(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
UChar *dest, int32_t destCapacity,
UErrorCode *status);
/************************************************************************************
*
* #define inline versions of selected performance-critical text access functions
* Caution: do not use auto increment++ or decrement-- expressions
* as parameters to these macros.
*
* For most use, where there is no extreme performance constraint, the
* normal, non-inline functions are a better choice. The resulting code
* will be smaller, and, if the need ever arises, easier to debug.
*
* These are implemented as #defines rather than real functions
* because there is no fully portable way to do inline functions in plain C.
*
************************************************************************************/
#ifndef U_HIDE_INTERNAL_API
#define UTEXT_CURRENT32(ut) \
((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->chunkOffset]<0xd800 ? \
((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut))
#endif /* U_HIDE_INTERNAL_API */
#define UTEXT_NEXT32(ut) \
((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->chunkOffset]<0xd800 ? \
((ut)->chunkContents)[((ut)->chunkOffset)++] : utext_next32(ut))
#define UTEXT_PREVIOUS32(ut) \
((ut)->chunkOffset > 0 && \
(ut)->chunkContents[(ut)->chunkOffset-1] < 0xd800 ? \
(ut)->chunkContents[--((ut)->chunkOffset)] : utext_previous32(ut))
#define UTEXT_GETNATIVEINDEX(ut) \
((ut)->chunkOffset <= (ut)->nativeIndexingLimit? \
(ut)->chunkNativeStart+(ut)->chunkOffset : \
(ut)->pFuncs->mapOffsetToNative(ut))
#define UTEXT_SETNATIVEINDEX(ut, ix) UPRV_BLOCK_MACRO_BEGIN { \
int64_t __offset = (ix) - (ut)->chunkNativeStart; \
if (__offset>=0 && __offset<(int64_t)(ut)->nativeIndexingLimit && (ut)->chunkContents[__offset]<0xdc00) { \
(ut)->chunkOffset=(int32_t)__offset; \
} else { \
utext_setNativeIndex((ut), (ix)); \
} \
} UPRV_BLOCK_MACRO_END
/************************************************************************************
*
* Functions related to writing or modifying the text.
* These will work only with modifiable UTexts. Attempting to
* modify a read-only UText will return an error status.
*
************************************************************************************/
U_CAPI UBool U_EXPORT2
utext_isWritable(const 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 UChar *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 void U_EXPORT2
utext_freeze(UText *ut);
enum {
UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE = 1,
UTEXT_PROVIDER_STABLE_CHUNKS = 2,
UTEXT_PROVIDER_WRITABLE = 3,
UTEXT_PROVIDER_HAS_META_DATA = 4,
UTEXT_PROVIDER_OWNS_TEXT = 5
};
typedef UText * U_CALLCONV
UTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status);
typedef int64_t U_CALLCONV
UTextNativeLength(UText *ut);
typedef UBool U_CALLCONV
UTextAccess(UText *ut, int64_t nativeIndex, UBool forward);
typedef int32_t U_CALLCONV
UTextExtract(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
UChar *dest, int32_t destCapacity,
UErrorCode *status);
typedef int32_t U_CALLCONV
UTextReplace(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
const UChar *replacementText, int32_t replacmentLength,
UErrorCode *status);
typedef void U_CALLCONV
UTextCopy(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
int64_t nativeDest,
UBool move,
UErrorCode *status);
typedef int64_t U_CALLCONV
UTextMapOffsetToNative(const UText *ut);
typedef int32_t U_CALLCONV
UTextMapNativeIndexToUTF16(const UText *ut, int64_t nativeIndex);
typedef void U_CALLCONV
UTextClose(UText *ut);
struct UTextFuncs {
int32_t tableSize;
int32_t reserved1, reserved2, reserved3;
UTextClone *clone;
UTextNativeLength *nativeLength;
UTextAccess *access;
UTextExtract *extract;
UTextReplace *replace;
UTextCopy *copy;
UTextMapOffsetToNative *mapOffsetToNative;
UTextMapNativeIndexToUTF16 *mapNativeIndexToUTF16;
UTextClose *close;
UTextClose *spare1;
UTextClose *spare2;
UTextClose *spare3;
};
typedef struct UTextFuncs UTextFuncs;
struct UText {
uint32_t magic;
int32_t flags;
int32_t providerProperties;
int32_t sizeOfStruct;
/* ------ 16 byte alignment boundary ----------- */
int64_t chunkNativeLimit;
int32_t extraSize;
int32_t nativeIndexingLimit;
/* ---- 16 byte alignment boundary------ */
int64_t chunkNativeStart;
int32_t chunkOffset;
int32_t chunkLength;
/* ---- 16 byte alignment boundary-- */
const UChar *chunkContents;
const UTextFuncs *pFuncs;
void *pExtra;
const void *context;
/* --- 16 byte alignment boundary--- */
const void *p;
const void *q;
const void *r;
void *privP;
/* --- 16 byte alignment boundary--- */
int64_t a;
int32_t b;
int32_t c;
/* ---- 16 byte alignment boundary---- */
int64_t privA;
int32_t privB;
int32_t privC;
};
U_CAPI UText * U_EXPORT2
utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status);
// do not use #ifndef U_HIDE_INTERNAL_API around the following!
enum {
UTEXT_MAGIC = 0x345ad82c
};
#define UTEXT_INITIALIZER { \
UTEXT_MAGIC, /* magic */ \
0, /* flags */ \
0, /* providerProps */ \
sizeof(UText), /* sizeOfStruct */ \
0, /* chunkNativeLimit */ \
0, /* extraSize */ \
0, /* nativeIndexingLimit */ \
0, /* chunkNativeStart */ \
0, /* chunkOffset */ \
0, /* chunkLength */ \
NULL, /* chunkContents */ \
NULL, /* pFuncs */ \
NULL, /* pExtra */ \
NULL, /* context */ \
NULL, NULL, NULL, /* p, q, r */ \
NULL, /* privP */ \
0, 0, 0, /* a, b, c */ \
0, 0, 0 /* privA,B,C, */ \
}
U_CDECL_END
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
U_DEFINE_LOCAL_OPEN_POINTER(LocalUTextPointer, UText, utext_close);
U_NAMESPACE_END
#endif
#endif
chariter.h
C++ API: Character Iterator.
LocalUTextPointer
"Smart pointer" class, closes a UText via utext_close().
icu::CharacterIterator
Abstract class that defines an API for iteration on text objects.
Definition chariter.h:361
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition rep.h:77
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:296
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition localpointer.h:550
U_CALLCONV
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition platform.h:846
rep.h
C++ API: Replaceable String.
UTextFuncs
(public) Function dispatch table for UText.
Definition utext.h:1194
UTextFuncs::reserved1
int32_t reserved1
(private) Alignment padding.
Definition utext.h:1216
UTextFuncs::reserved2
int32_t reserved2
Definition utext.h:1216
UTextFuncs::mapOffsetToNative
UTextMapOffsetToNative * mapOffsetToNative
(public) Function pointer for UTextMapOffsetToNative.
Definition utext.h:1274
UTextFuncs::access
UTextAccess * access
(public) Function pointer for UTextAccess.
Definition utext.h:1242
UTextFuncs::extract
UTextExtract * extract
(public) Function pointer for UTextExtract.
Definition utext.h:1250
UTextFuncs::reserved3
int32_t reserved3
Definition utext.h:1216
UTextFuncs::spare3
UTextClose * spare3
(private) Spare function pointer
Definition utext.h:1308
UTextFuncs::tableSize
int32_t tableSize
(public) Function table size, sizeof(UTextFuncs) Intended for use should the table grow to accommodat...
Definition utext.h:1209
UTextFuncs::nativeLength
UTextNativeLength * nativeLength
(public) function pointer for UTextLength May be expensive to compute!
Definition utext.h:1234
UTextFuncs::replace
UTextReplace * replace
(public) Function pointer for UTextReplace.
Definition utext.h:1258
UTextFuncs::spare2
UTextClose * spare2
(private) Spare function pointer
Definition utext.h:1302
UTextFuncs::spare1
UTextClose * spare1
(private) Spare function pointer
Definition utext.h:1296
UTextFuncs::copy
UTextCopy * copy
(public) Function pointer for UTextCopy.
Definition utext.h:1266
UTextFuncs::mapNativeIndexToUTF16
UTextMapNativeIndexToUTF16 * mapNativeIndexToUTF16
(public) Function pointer for UTextMapNativeIndexToUTF16.
Definition utext.h:1282
UTextFuncs::close
UTextClose * close
(public) Function pointer for UTextClose.
Definition utext.h:1290
UTextFuncs::clone
UTextClone * clone
(public) Function pointer for UTextClone
Definition utext.h:1225
UText
UText struct.
Definition utext.h:1328
UText::b
int32_t b
(protected) Integer field reserved for use by the text provider.
Definition utext.h:1489
UText::chunkOffset
int32_t chunkOffset
(protected) Current iteration position within the text chunk (UTF-16 buffer).
Definition utext.h:1405
UText::p
const void * p
(protected) Pointer fields available for use by the text provider.
Definition utext.h:1452
UText::extraSize
int32_t extraSize
(protected) Size in bytes of the extra space (pExtra).
Definition utext.h:1381
UText::privA
int64_t privA
Private field reserved for future use by the UText framework itself.
Definition utext.h:1506
UText::nativeIndexingLimit
int32_t nativeIndexingLimit
(protected) The highest chunk offset where native indexing and chunk (UTF-16) indexing correspond.
Definition utext.h:1390
UText::flags
int32_t flags
Definition utext.h:1349
UText::sizeOfStruct
int32_t sizeOfStruct
(public) sizeOfStruct=sizeof(UText) Allows possible backward compatible extension.
Definition utext.h:1365
UText::pExtra
void * pExtra
(protected) Pointer to additional space requested by the text provider during the utext_open operatio...
Definition utext.h:1435
UText::chunkNativeLimit
int64_t chunkNativeLimit
(protected) Native index of the first character position following the current chunk.
Definition utext.h:1375
UText::r
const void * r
(protected) Pointer fields available for use by the text provider.
Definition utext.h:1464
UText::privB
int32_t privB
Private field reserved for future use by the UText framework itself.
Definition utext.h:1512
UText::magic
uint32_t magic
Definition utext.h:1341
UText::pFuncs
const UTextFuncs * pFuncs
(public) Pointer to Dispatch table for accessing functions for this UText.
Definition utext.h:1428
UText::chunkLength
int32_t chunkLength
(protected) Length the text chunk (UTF-16 buffer), in UChars.
Definition utext.h:1411
UText::providerProperties
int32_t providerProperties
Text provider properties.
Definition utext.h:1357
UText::chunkContents
const UChar * chunkContents
(protected) pointer to a chunk of text in UTF-16 format.
Definition utext.h:1422
UText::privC
int32_t privC
Private field reserved for future use by the UText framework itself.
Definition utext.h:1518
UText::q
const void * q
(protected) Pointer fields available for use by the text provider.
Definition utext.h:1458
UText::privP
void * privP
Private field reserved for future use by the UText framework itself.
Definition utext.h:1471
UText::chunkNativeStart
int64_t chunkNativeStart
(protected) Native index of the first character in the text chunk.
Definition utext.h:1398
UText::context
const void * context
(protected) Pointer to string or text-containing object or similar.
Definition utext.h:1443
UText::c
int32_t c
(protected) Integer field reserved for use by the text provider.
Definition utext.h:1496
UText::a
int64_t a
(protected) Integer field reserved for use by the text provider.
Definition utext.h:1482
uchar.h
C API: Unicode Properties.
UChar32
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition umachine.h:427
U_CDECL_END
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition umachine.h:86
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:247
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition umachine.h:378
U_CDECL_BEGIN
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition umachine.h:85
unistr.h
C++ API: Unicode String.
UTextReplace
int32_t UTextReplace(UText *ut, int64_t nativeStart, int64_t nativeLimit, const UChar *replacementText, int32_t replacmentLength, UErrorCode *status)
Function type declaration for UText.replace().
Definition utext.h:1089
utext_previous32From
U_CAPI UChar32 utext_previous32From(UText *ut, int64_t nativeIndex)
Set the iteration index, and return the code point preceding the one specified by the initial index.
utext_openUTF8
U_CAPI UText * utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status)
Open a read-only UText implementation for UTF-8 strings.
utext_close
U_CAPI UText * utext_close(UText *ut)
Close function for UText instances.
utext_previous32
U_CAPI UChar32 utext_previous32(UText *ut)
Move the iterator position to the character (code point) whose index precedes the current position,...
UTextClone
UText * UTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status)
Function type declaration for UText.clone().
Definition utext.h:984
utext_moveIndex32
U_CAPI UBool utext_moveIndex32(UText *ut, int32_t delta)
Move the iterator position by delta code points.
utext_openConstUnicodeString
U_CAPI UText * utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode *status)
Open a UText for a const UnicodeString.
UTextNativeLength
int64_t UTextNativeLength(UText *ut)
Function type declaration for UText.nativeLength().
Definition utext.h:996
utext_hasMetaData
U_CAPI UBool utext_hasMetaData(const UText *ut)
Test whether there is meta data associated with the text.
UTextExtract
int32_t UTextExtract(UText *ut, int64_t nativeStart, int64_t nativeLimit, UChar *dest, int32_t destCapacity, UErrorCode *status)
Function type declaration for UText.extract().
Definition utext.h:1054
UTextClose
void UTextClose(UText *ut)
Function type declaration for UText.utextClose().
Definition utext.h:1182
utext_extract
U_CAPI int32_t utext_extract(UText *ut, int64_t nativeStart, int64_t nativeLimit, UChar *dest, int32_t destCapacity, UErrorCode *status)
Extract text from a UText into a UChar buffer.
UTEXT_PROVIDER_HAS_META_DATA
@ UTEXT_PROVIDER_HAS_META_DATA
There is meta data associated with the text.
Definition utext.h:935
UTEXT_PROVIDER_STABLE_CHUNKS
@ UTEXT_PROVIDER_STABLE_CHUNKS
Text chunks remain valid and usable until the text object is modified or deleted, not just until the ...
Definition utext.h:922
UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE
@ UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE
It is potentially time consuming for the provider to determine the length of the text.
Definition utext.h:915
UTEXT_PROVIDER_OWNS_TEXT
@ UTEXT_PROVIDER_OWNS_TEXT
Text provider owns the text storage.
Definition utext.h:943
UTEXT_PROVIDER_WRITABLE
@ UTEXT_PROVIDER_WRITABLE
The provider supports modifying the text via the replace() and copy() functions.
Definition utext.h:929
utext_setup
U_CAPI UText * utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status)
Common function for use by Text Provider implementations to allocate and/or initialize a new UText st...
UTextAccess
UBool UTextAccess(UText *ut, int64_t nativeIndex, UBool forward)
Function type declaration for UText.access().
Definition utext.h:1024
utext_openCharacterIterator
U_CAPI UText * utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *status)
Open a UText implementation over an ICU CharacterIterator.
utext_openUChars
U_CAPI UText * utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status)
Open a read-only UText for UChar * string.
UTextMapOffsetToNative
int64_t UTextMapOffsetToNative(const UText *ut)
Function type declaration for UText.mapOffsetToNative().
Definition utext.h:1143
utext_copy
U_CAPI void utext_copy(UText *ut, int64_t nativeStart, int64_t nativeLimit, int64_t destIndex, UBool move, UErrorCode *status)
Copy or move a substring from one position to another within the text, while retaining any metadata a...
UTextMapNativeIndexToUTF16
int32_t UTextMapNativeIndexToUTF16(const UText *ut, int64_t nativeIndex)
Function type declaration for UText.mapIndexToUTF16().
Definition utext.h:1161
utext_openReplaceable
U_CAPI UText * utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status)
Open a writable UText implementation for an ICU Replaceable object.
utext_char32At
U_CAPI UChar32 utext_char32At(UText *ut, int64_t nativeIndex)
Returns the code point at the requested index, or U_SENTINEL (-1) if it is out of bounds.
utext_equals
U_CAPI UBool utext_equals(const UText *a, const UText *b)
Compare two UText objects for equality.
utext_nativeLength
U_CAPI int64_t utext_nativeLength(UText *ut)
Get the length of the text.
utext_isLengthExpensive
U_CAPI UBool utext_isLengthExpensive(const UText *ut)
Return true if calculating the length of the text could be expensive.
UTextCopy
void UTextCopy(UText *ut, int64_t nativeStart, int64_t nativeLimit, int64_t nativeDest, UBool move, UErrorCode *status)
Function type declaration for UText.copy().
Definition utext.h:1123
utext_freeze
U_CAPI void utext_freeze(UText *ut)
utext_getPreviousNativeIndex
U_CAPI int64_t utext_getPreviousNativeIndex(UText *ut)
Get the native index of the character preceding the current position.
utext_isWritable
U_CAPI UBool utext_isWritable(const UText *ut)
Return true if the text can be written (modified) with utext_replace() or utext_copy().
utext_replace
U_CAPI int32_t utext_replace(UText *ut, int64_t nativeStart, int64_t nativeLimit, const UChar *replacementText, int32_t replacementLength, UErrorCode *status)
Replace a range of the original text with a replacement text.
utext_setNativeIndex
U_CAPI void utext_setNativeIndex(UText *ut, int64_t nativeIndex)
Set the current iteration position to the nearest code point boundary at or preceding the specified i...
utext_next32From
U_CAPI UChar32 utext_next32From(UText *ut, int64_t nativeIndex)
Set the iteration index and return the code point at that index.
utext_getNativeIndex
U_CAPI int64_t utext_getNativeIndex(const UText *ut)
Get the current iterator position, which can range from 0 to the length of the text.
utext_clone
U_CAPI UText * utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status)
Clone a UText.
utext_next32
U_CAPI UChar32 utext_next32(UText *ut)
Get the code point at the current iteration position of the UText, and advance the position to the fi...
utext_current32
U_CAPI UChar32 utext_current32(UText *ut)
Get the code point at the current iteration position, or U_SENTINEL (-1) if the iteration has reached...
utext_openUnicodeString
U_CAPI UText * utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status)
Open a writable UText for a non-const UnicodeString.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:430