ICU4C 79
Loading...
Searching...
No Matches
ustring.h
Go to the documentation of this file.
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4**********************************************************************
5* Copyright (C) 1998-2014, International Business Machines
6* Corporation and others. All Rights Reserved.
7**********************************************************************
8*
9* File ustring.h
10*
11* Modification History:
12*
13* Date Name Description
14* 12/07/98 bertrand Creation.
15******************************************************************************
16*/
17
18#ifndef USTRING_H
19#define USTRING_H
20
21#include "unicode/utypes.h"
22#include "unicode/putil.h"
23#include "unicode/uiter.h"
24
30#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
31# define UBRK_TYPEDEF_UBREAK_ITERATOR
34#endif
35
91U_CAPI int32_t U_EXPORT2
92u_strlen(const UChar *s);
108U_CAPI int32_t U_EXPORT2
109u_countChar32(const UChar *s, int32_t length);
110
129U_CAPI UBool U_EXPORT2
130u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number);
131
142U_CAPI UChar* U_EXPORT2
143u_strcat(UChar* dst U_LIFETIME_BOUND, const UChar* src);
144
159U_CAPI UChar* U_EXPORT2
160u_strncat(UChar* dst U_LIFETIME_BOUND, const UChar* src, int32_t n);
161
182U_CAPI UChar* U_EXPORT2
183u_strstr(const UChar* s U_LIFETIME_BOUND, const UChar* substring);
184
206U_CAPI UChar* U_EXPORT2
207u_strFindFirst(const UChar* s U_LIFETIME_BOUND,
208 int32_t length,
209 const UChar* substring,
210 int32_t subLength);
211
229U_CAPI UChar* U_EXPORT2
230u_strchr(const UChar* s U_LIFETIME_BOUND, UChar c);
231
249U_CAPI UChar* U_EXPORT2
250u_strchr32(const UChar* s U_LIFETIME_BOUND, UChar32 c);
251
272U_CAPI UChar* U_EXPORT2
273u_strrstr(const UChar* s U_LIFETIME_BOUND, const UChar* substring);
274
296U_CAPI UChar* U_EXPORT2
297u_strFindLast(const UChar* s U_LIFETIME_BOUND,
298 int32_t length,
299 const UChar* substring,
300 int32_t subLength);
301
319U_CAPI UChar* U_EXPORT2
320u_strrchr(const UChar* s U_LIFETIME_BOUND, UChar c);
321
339U_CAPI UChar* U_EXPORT2
340u_strrchr32(const UChar* s U_LIFETIME_BOUND, UChar32 c);
341
354U_CAPI UChar* U_EXPORT2
355u_strpbrk(const UChar* string U_LIFETIME_BOUND, const UChar* matchSet);
356
370U_CAPI int32_t U_EXPORT2
371u_strcspn(const UChar *string, const UChar *matchSet);
372
386U_CAPI int32_t U_EXPORT2
387u_strspn(const UChar *string, const UChar *matchSet);
388
414U_CAPI UChar* U_EXPORT2
415u_strtok_r(UChar* src U_LIFETIME_BOUND, const UChar* delim, UChar** saveState);
416
427U_CAPI int32_t U_EXPORT2
428u_strcmp(const UChar *s1,
429 const UChar *s2);
430
442U_CAPI int32_t U_EXPORT2
443u_strcmpCodePointOrder(const UChar *s1, const UChar *s2);
444
472U_CAPI int32_t U_EXPORT2
473u_strCompare(const UChar *s1, int32_t length1,
474 const UChar *s2, int32_t length2,
475 UBool codePointOrder);
476
497U_CAPI int32_t U_EXPORT2
498u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder);
499
540U_CAPI int32_t U_EXPORT2
541u_strCaseCompare(const UChar *s1, int32_t length1,
542 const UChar *s2, int32_t length2,
543 uint32_t options,
544 UErrorCode *pErrorCode);
545
558U_CAPI int32_t U_EXPORT2
559u_strncmp(const UChar *ucs1,
560 const UChar *ucs2,
561 int32_t n);
562
576U_CAPI int32_t U_EXPORT2
577u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n);
578
598U_CAPI int32_t U_EXPORT2
599u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options);
600
622U_CAPI int32_t U_EXPORT2
623u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options);
624
646U_CAPI int32_t U_EXPORT2
647u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options);
648
657U_CAPI UChar* U_EXPORT2
658u_strcpy(UChar* dst U_LIFETIME_BOUND, const UChar* src);
659
671U_CAPI UChar* U_EXPORT2
672u_strncpy(UChar* dst U_LIFETIME_BOUND, const UChar* src, int32_t n);
673
674#if !UCONFIG_NO_CONVERSION
675
686U_CAPI UChar* U_EXPORT2 u_uastrcpy(UChar* dst U_LIFETIME_BOUND, const char* src);
687
700U_CAPI UChar* U_EXPORT2 u_uastrncpy(UChar* dst U_LIFETIME_BOUND, const char* src, int32_t n);
701
712U_CAPI char* U_EXPORT2 u_austrcpy(char* dst U_LIFETIME_BOUND, const UChar* src);
713
726U_CAPI char* U_EXPORT2 u_austrncpy(char* dst U_LIFETIME_BOUND, const UChar* src, int32_t n);
727
728#endif
729
738U_CAPI UChar* U_EXPORT2
739u_memcpy(UChar* dest U_LIFETIME_BOUND, const UChar* src, int32_t count);
740
749U_CAPI UChar* U_EXPORT2
750u_memmove(UChar* dest U_LIFETIME_BOUND, const UChar* src, int32_t count);
751
761U_CAPI UChar* U_EXPORT2
762u_memset(UChar* dest U_LIFETIME_BOUND, UChar c, int32_t count);
763
775U_CAPI int32_t U_EXPORT2
776u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count);
777
791U_CAPI int32_t U_EXPORT2
792u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count);
793
811U_CAPI UChar* U_EXPORT2
812u_memchr(const UChar* s U_LIFETIME_BOUND, UChar c, int32_t count);
813
831U_CAPI UChar* U_EXPORT2
832u_memchr32(const UChar* s U_LIFETIME_BOUND, UChar32 c, int32_t count);
833
851U_CAPI UChar* U_EXPORT2
852u_memrchr(const UChar* s U_LIFETIME_BOUND, UChar c, int32_t count);
853
871U_CAPI UChar* U_EXPORT2
872u_memrchr32(const UChar* s U_LIFETIME_BOUND, UChar32 c, int32_t count);
873
921#if defined(U_DECLARE_UTF16)
922# define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs)
924# define U_STRING_INIT(var, cs, length)
925#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || defined(U_WCHAR_IS_UTF16))
926# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=L ## cs
928# define U_STRING_INIT(var, cs, length)
929#else
930# define U_STRING_DECL(var, cs, length) static UChar var[(length)+1]
932# define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1)
933#endif
934
982U_CAPI int32_t U_EXPORT2
983u_unescape(const char *src,
984 UChar *dest, int32_t destCapacity);
985
999typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context);
1001
1030U_CAPI UChar32 U_EXPORT2
1032 int32_t *offset,
1033 int32_t length,
1034 void *context);
1035
1056U_CAPI int32_t U_EXPORT2
1057u_strToUpper(UChar *dest, int32_t destCapacity,
1058 const UChar *src, int32_t srcLength,
1059 const char *locale,
1060 UErrorCode *pErrorCode);
1061
1082U_CAPI int32_t U_EXPORT2
1083u_strToLower(UChar *dest, int32_t destCapacity,
1084 const UChar *src, int32_t srcLength,
1085 const char *locale,
1086 UErrorCode *pErrorCode);
1087
1088#if !UCONFIG_NO_BREAK_ITERATION
1089
1128U_CAPI int32_t U_EXPORT2
1129u_strToTitle(UChar *dest, int32_t destCapacity,
1130 const UChar *src, int32_t srcLength,
1131 UBreakIterator *titleIter,
1132 const char *locale,
1133 UErrorCode *pErrorCode);
1134
1135#endif
1136
1161U_CAPI int32_t U_EXPORT2
1162u_strFoldCase(UChar *dest, int32_t destCapacity,
1163 const UChar *src, int32_t srcLength,
1164 uint32_t options,
1165 UErrorCode *pErrorCode);
1166
1167#if defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32) || !UCONFIG_NO_CONVERSION
1190U_CAPI wchar_t* U_EXPORT2
1191u_strToWCS(wchar_t* dest U_LIFETIME_BOUND,
1192 int32_t destCapacity,
1193 int32_t* pDestLength,
1194 const UChar* src,
1195 int32_t srcLength,
1196 UErrorCode* pErrorCode);
1219U_CAPI UChar* U_EXPORT2
1220u_strFromWCS(UChar* dest U_LIFETIME_BOUND,
1221 int32_t destCapacity,
1222 int32_t* pDestLength,
1223 const wchar_t* src,
1224 int32_t srcLength,
1225 UErrorCode* pErrorCode);
1226#endif /* defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32) || !UCONFIG_NO_CONVERSION */
1227
1250U_CAPI char* U_EXPORT2
1251u_strToUTF8(char* dest U_LIFETIME_BOUND,
1252 int32_t destCapacity,
1253 int32_t* pDestLength,
1254 const UChar* src,
1255 int32_t srcLength,
1256 UErrorCode* pErrorCode);
1257
1280U_CAPI UChar* U_EXPORT2
1281u_strFromUTF8(UChar* dest U_LIFETIME_BOUND,
1282 int32_t destCapacity,
1283 int32_t* pDestLength,
1284 const char* src,
1285 int32_t srcLength,
1286 UErrorCode* pErrorCode);
1287
1323U_CAPI char* U_EXPORT2
1324u_strToUTF8WithSub(char* dest U_LIFETIME_BOUND,
1325 int32_t destCapacity,
1326 int32_t* pDestLength,
1327 const UChar* src,
1328 int32_t srcLength,
1329 UChar32 subchar,
1330 int32_t* pNumSubstitutions,
1331 UErrorCode* pErrorCode);
1332
1369U_CAPI UChar* U_EXPORT2
1370u_strFromUTF8WithSub(UChar* dest U_LIFETIME_BOUND,
1371 int32_t destCapacity,
1372 int32_t* pDestLength,
1373 const char* src,
1374 int32_t srcLength,
1375 UChar32 subchar,
1376 int32_t* pNumSubstitutions,
1377 UErrorCode* pErrorCode);
1378
1430U_CAPI UChar* U_EXPORT2
1431u_strFromUTF8Lenient(UChar* dest U_LIFETIME_BOUND,
1432 int32_t destCapacity,
1433 int32_t* pDestLength,
1434 const char* src,
1435 int32_t srcLength,
1436 UErrorCode* pErrorCode);
1437
1460U_CAPI UChar32* U_EXPORT2
1461u_strToUTF32(UChar32* dest U_LIFETIME_BOUND,
1462 int32_t destCapacity,
1463 int32_t* pDestLength,
1464 const UChar* src,
1465 int32_t srcLength,
1466 UErrorCode* pErrorCode);
1467
1490U_CAPI UChar* U_EXPORT2
1491u_strFromUTF32(UChar* dest U_LIFETIME_BOUND,
1492 int32_t destCapacity,
1493 int32_t* pDestLength,
1494 const UChar32* src,
1495 int32_t srcLength,
1496 UErrorCode* pErrorCode);
1497
1533U_CAPI UChar32* U_EXPORT2
1534u_strToUTF32WithSub(UChar32* dest U_LIFETIME_BOUND,
1535 int32_t destCapacity,
1536 int32_t* pDestLength,
1537 const UChar* src,
1538 int32_t srcLength,
1539 UChar32 subchar,
1540 int32_t* pNumSubstitutions,
1541 UErrorCode* pErrorCode);
1542
1578U_CAPI UChar* U_EXPORT2
1579u_strFromUTF32WithSub(UChar* dest U_LIFETIME_BOUND,
1580 int32_t destCapacity,
1581 int32_t* pDestLength,
1582 const UChar32* src,
1583 int32_t srcLength,
1584 UChar32 subchar,
1585 int32_t* pNumSubstitutions,
1586 UErrorCode* pErrorCode);
1587
1620U_CAPI char* U_EXPORT2
1621u_strToJavaModifiedUTF8(char* dest U_LIFETIME_BOUND,
1622 int32_t destCapacity,
1623 int32_t* pDestLength,
1624 const UChar* src,
1625 int32_t srcLength,
1626 UErrorCode* pErrorCode);
1627
1669U_CAPI UChar* U_EXPORT2
1671 int32_t destCapacity,
1672 int32_t* pDestLength,
1673 const char* src,
1674 int32_t srcLength,
1675 UChar32 subchar,
1676 int32_t* pNumSubstitutions,
1677 UErrorCode* pErrorCode);
1678
1679#endif
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition platform.h:881
C API: Platform Utilities.
C API for code unit iteration.
Definition uiter.h:341
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition ubrk.h:31
C API: Unicode Character Iteration.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition umachine.h:449
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition umachine.h:86
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition umachine.h:110
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition umachine.h:400
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition umachine.h:85
U_CAPI UChar * u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength)
Find the last occurrence of a substring in a string.
U_CAPI int32_t u_strcmp(const UChar *s1, const UChar *s2)
Compare two Unicode strings for bitwise equality (code unit order).
U_CAPI UChar32 u_unescapeAt(UNESCAPE_CHAR_AT charAt, int32_t *offset, int32_t length, void *context)
Unescape a single sequence.
U_CAPI UChar * u_strpbrk(const UChar *string, const UChar *matchSet)
Locates the first occurrence in the string string of any of the characters in the string matchSet.
U_CAPI wchar_t * u_strToWCS(wchar_t *dest, int32_t destCapacity, int32_t *pDestLength, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a UTF-16 string to a wchar_t string.
U_CAPI int32_t u_strToLower(UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, const char *locale, UErrorCode *pErrorCode)
Lowercase the characters in a string.
U_CAPI char * u_strToUTF8(char *dest, int32_t destCapacity, int32_t *pDestLength, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a UTF-16 string to UTF-8.
U_CAPI int32_t u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count)
Compare the first count UChars of each buffer.
U_CAPI UChar * u_memchr(const UChar *s, UChar c, int32_t count)
Find the first occurrence of a BMP code point in a string.
U_CAPI UChar * u_strFromWCS(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const wchar_t *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a wchar_t string to UTF-16.
U_CAPI char * u_austrcpy(char *dst, const UChar *src)
Copy ustring to a byte string encoded in the default codepage.
U_CAPI UChar * u_strrchr32(const UChar *s, UChar32 c)
Find the last occurrence of a code point in a string.
U_CAPI int32_t u_strspn(const UChar *string, const UChar *matchSet)
Returns the number of consecutive characters in string, beginning with the first, that occur somewher...
U_CAPI UChar * u_strFromUTF8(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a UTF-8 string to UTF-16.
U_CAPI UChar * u_strncat(UChar *dst, const UChar *src, int32_t n)
Concatenate two ustrings.
U_CAPI int32_t u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options)
Compare two strings case-insensitively using full case folding.
U_CAPI int32_t u_strlen(const UChar *s)
Determine the length of an array of UChar.
U_CAPI int32_t u_strToTitle(UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, UBreakIterator *titleIter, const char *locale, UErrorCode *pErrorCode)
Titlecase a string.
U_CAPI int32_t u_strncmp(const UChar *ucs1, const UChar *ucs2, int32_t n)
Compare two ustrings for bitwise equality.
U_CAPI UChar * u_memrchr(const UChar *s, UChar c, int32_t count)
Find the last occurrence of a BMP code point in a string.
U_CAPI int32_t u_unescape(const char *src, UChar *dest, int32_t destCapacity)
Unescape a string of characters and write the resulting Unicode characters to the destination buffer.
UChar(* UNESCAPE_CHAR_AT)(int32_t offset, void *context)
Callback function for u_unescapeAt() that returns a character of the source text given an offset and ...
Definition ustring.h:999
U_CAPI char * u_strToJavaModifiedUTF8(char *dest, int32_t destCapacity, int32_t *pDestLength, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a 16-bit Unicode string to Java Modified UTF-8.
U_CAPI char * u_strToUTF8WithSub(char *dest, int32_t destCapacity, int32_t *pDestLength, const UChar *src, int32_t srcLength, UChar32 subchar, int32_t *pNumSubstitutions, UErrorCode *pErrorCode)
Convert a UTF-16 string to UTF-8.
U_CAPI int32_t u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n)
Compare two Unicode strings in code point order.
U_CAPI UChar * u_strFromUTF8Lenient(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a UTF-8 string to UTF-16.
U_CAPI UChar32 * u_strToUTF32(UChar32 *dest, int32_t destCapacity, int32_t *pDestLength, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a UTF-16 string to UTF-32.
U_CAPI UChar * u_uastrncpy(UChar *dst, const char *src, int32_t n)
Copy a byte string encoded in the default codepage to a ustring.
U_CAPI UChar * u_memset(UChar *dest, UChar c, int32_t count)
Initialize count characters of dest to c.
U_CAPI UChar * u_strchr(const UChar *s, UChar c)
Find the first occurrence of a BMP code point in a string.
U_CAPI UChar * u_strFromUTF8WithSub(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const char *src, int32_t srcLength, UChar32 subchar, int32_t *pNumSubstitutions, UErrorCode *pErrorCode)
Convert a UTF-8 string to UTF-16.
U_CAPI int32_t u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options)
Compare two strings case-insensitively using full case folding.
U_CAPI UChar * u_memmove(UChar *dest, const UChar *src, int32_t count)
Synonym for memmove(), but with UChars only.
U_CAPI int32_t u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder)
Compare two Unicode strings (binary order) as presented by UCharIterator objects.
U_CAPI UChar * u_strcat(UChar *dst, const UChar *src)
Concatenate two ustrings.
U_CAPI int32_t u_strcmpCodePointOrder(const UChar *s1, const UChar *s2)
Compare two Unicode strings in code point order.
U_CAPI UChar * u_strFromUTF32WithSub(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const UChar32 *src, int32_t srcLength, UChar32 subchar, int32_t *pNumSubstitutions, UErrorCode *pErrorCode)
Convert a UTF-32 string to UTF-16.
U_CAPI UChar * u_uastrcpy(UChar *dst, const char *src)
Copy a byte string encoded in the default codepage to a ustring.
U_CAPI UChar * u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength)
Find the first occurrence of a substring in a string.
U_CAPI int32_t u_strToUpper(UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, const char *locale, UErrorCode *pErrorCode)
Uppercase the characters in a string.
U_CAPI char * u_austrncpy(char *dst, const UChar *src, int32_t n)
Copy ustring to a byte string encoded in the default codepage.
U_CAPI UChar * u_memrchr32(const UChar *s, UChar32 c, int32_t count)
Find the last occurrence of a code point in a string.
U_CAPI int32_t u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options)
Compare two strings case-insensitively using full case folding.
U_CAPI UChar * u_strrstr(const UChar *s, const UChar *substring)
Find the last occurrence of a substring in a string.
U_CAPI UBool u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number)
Check if the string contains more Unicode code points than a certain number.
U_CAPI UChar * u_strncpy(UChar *dst, const UChar *src, int32_t n)
Copy a ustring.
U_CAPI UChar * u_strtok_r(UChar *src, const UChar *delim, UChar **saveState)
The string tokenizer API allows an application to break a string into tokens.
U_CAPI int32_t u_strcspn(const UChar *string, const UChar *matchSet)
Returns the number of consecutive characters in string, beginning with the first, that do not occur s...
U_CAPI UChar * u_memchr32(const UChar *s, UChar32 c, int32_t count)
Find the first occurrence of a code point in a string.
U_CAPI int32_t u_strCompare(const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, UBool codePointOrder)
Compare two Unicode strings (binary order).
U_CAPI UChar32 * u_strToUTF32WithSub(UChar32 *dest, int32_t destCapacity, int32_t *pDestLength, const UChar *src, int32_t srcLength, UChar32 subchar, int32_t *pNumSubstitutions, UErrorCode *pErrorCode)
Convert a UTF-16 string to UTF-32.
U_CAPI UChar * u_memcpy(UChar *dest, const UChar *src, int32_t count)
Synonym for memcpy(), but with UChars only.
U_CAPI int32_t u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count)
Compare two Unicode strings in code point order.
U_CAPI UChar * u_strFromJavaModifiedUTF8WithSub(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const char *src, int32_t srcLength, UChar32 subchar, int32_t *pNumSubstitutions, UErrorCode *pErrorCode)
Convert a Java Modified UTF-8 string to a 16-bit Unicode string.
U_CAPI int32_t u_strFoldCase(UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, uint32_t options, UErrorCode *pErrorCode)
Case-folds the characters in a string.
U_CAPI UChar * u_strstr(const UChar *s, const UChar *substring)
Find the first occurrence of a substring in a string.
U_CAPI int32_t u_countChar32(const UChar *s, int32_t length)
Count Unicode code points in the length UChar code units of the string.
U_CAPI UChar * u_strFromUTF32(UChar *dest, int32_t destCapacity, int32_t *pDestLength, const UChar32 *src, int32_t srcLength, UErrorCode *pErrorCode)
Convert a UTF-32 string to UTF-16.
U_CAPI UChar * u_strchr32(const UChar *s, UChar32 c)
Find the first occurrence of a code point in a string.
U_CAPI int32_t u_strCaseCompare(const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, uint32_t options, UErrorCode *pErrorCode)
Compare two strings case-insensitively using full case folding.
U_CAPI UChar * u_strcpy(UChar *dst, const UChar *src)
Copy a ustring.
U_CAPI UChar * u_strrchr(const UChar *s, UChar c)
Find the last occurrence of a BMP code point in a string.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:509