00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
#ifndef USTRING_H
00017
#define USTRING_H
00018
#include "unicode/utypes.h"
00019
00021
#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
00022
# define UBRK_TYPEDEF_UBREAK_ITERATOR
00023 typedef void *
UBreakIterator;
00024
#endif
00025
00070 U_CAPI int32_t U_EXPORT2
00071
u_strlen(
const UChar *s);
00072
00086 U_CAPI int32_t U_EXPORT2
00087
u_countChar32(
const UChar *s, int32_t length);
00088
00099 U_CAPI
UChar* U_EXPORT2
00100
u_strcat(UChar *dst,
00101
const UChar *src);
00102
00114 U_CAPI
UChar* U_EXPORT2
00115
u_strncat(UChar *dst,
00116
const UChar *src,
00117 int32_t n);
00118
00128 U_CAPI
UChar* U_EXPORT2
00129
u_strchr(
const UChar *s,
00130 UChar c);
00131
00141 U_CAPI
UChar * U_EXPORT2
00142
u_strstr(
const UChar *s,
const UChar *substring);
00143
00168 U_CAPI
UChar * U_EXPORT2
00169
u_strchr32(
const UChar *s, UChar32 c);
00170
00180 U_CAPI
UChar * U_EXPORT2
00181
u_strpbrk(
const UChar *string,
const UChar *matchSet);
00182
00191 U_CAPI int32_t U_EXPORT2
00192
u_strcspn(
const UChar *string,
const UChar *matchSet);
00193
00202 U_CAPI int32_t U_EXPORT2
00203
u_strspn(
const UChar *string,
const UChar *matchSet);
00204
00230 U_CAPI
UChar * U_EXPORT2
00231
u_strtok_r(UChar *src,
00232
const UChar *delim,
00233 UChar **saveState);
00234
00245 U_CAPI int32_t U_EXPORT2
00246
u_strcmp(
const UChar *s1,
00247
const UChar *s2);
00248
00266 U_CAPI int32_t U_EXPORT2
00267
u_strcmpCodePointOrder(
const UChar *s1,
const UChar *s2);
00268
00281 U_CAPI int32_t U_EXPORT2
00282
u_strncmp(
const UChar *ucs1,
00283
const UChar *ucs2,
00284 int32_t n);
00285
00299 U_CAPI int32_t U_EXPORT2
00300
u_strncmpCodePointOrder(
const UChar *s1,
const UChar *s2, int32_t n);
00301
00312 U_CAPI int32_t U_EXPORT2
00313
u_strcasecmp(
const UChar *s1,
const UChar *s2, uint32_t options);
00314
00327 U_CAPI int32_t U_EXPORT2
00328
u_strncasecmp(
const UChar *s1,
const UChar *s2, int32_t n, uint32_t options);
00329
00342 U_CAPI int32_t U_EXPORT2
00343
u_memcasecmp(
const UChar *s1,
const UChar *s2, int32_t length, uint32_t options);
00344
00353 U_CAPI
UChar* U_EXPORT2
00354
u_strcpy(UChar *dst,
00355
const UChar *src);
00356
00368 U_CAPI
UChar* U_EXPORT2
00369
u_strncpy(UChar *dst,
00370
const UChar *src,
00371 int32_t n);
00372
00383 U_CAPI
UChar* U_EXPORT2
u_uastrcpy(UChar *dst,
00384
const char *src );
00385
00398 U_CAPI
UChar* U_EXPORT2
u_uastrncpy(UChar *dst,
00399
const char *src,
00400 int32_t n);
00401
00412 U_CAPI
char* U_EXPORT2
u_austrcpy(
char *dst,
00413
const UChar *src );
00414
00427 U_CAPI
char* U_EXPORT2
u_austrncpy(
char *dst,
00428
const UChar *src,
00429 int32_t n );
00430
00435 U_CAPI
UChar* U_EXPORT2
00436
u_memcpy(UChar *dest,
const UChar *src, int32_t count);
00437
00442 U_CAPI
UChar* U_EXPORT2
00443
u_memmove(UChar *dest,
const UChar *src, int32_t count);
00444
00454 U_CAPI
UChar* U_EXPORT2
00455
u_memset(UChar *dest, UChar c, int32_t count);
00456
00468 U_CAPI int32_t U_EXPORT2
00469
u_memcmp(
const UChar *buf1,
const UChar *buf2, int32_t count);
00470
00484 U_CAPI int32_t U_EXPORT2
00485
u_memcmpCodePointOrder(
const UChar *s1,
const UChar *s2, int32_t count);
00486
00499 U_CAPI
UChar* U_EXPORT2
00500
u_memchr(
const UChar *src, UChar ch, int32_t count);
00501
00526 U_CAPI
UChar* U_EXPORT2
00527
u_memchr32(
const UChar *src, UChar32 ch, int32_t count);
00528
00565
#if U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && U_CHARSET_FAMILY==U_ASCII_FAMILY
00566 # define U_STRING_DECL(var, cs, length) static const wchar_t var[(length)+1]={ L ## cs }
00567
# define U_STRING_INIT(var, cs, length)
00568
#elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY
00569
# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]={ (const UChar *)cs }
00570
# define U_STRING_INIT(var, cs, length)
00571
#else
00572
# define U_STRING_DECL(var, cs, length) static UChar var[(length)+1]
00573
# define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1)
00574
#endif
00575
00622 U_CAPI int32_t U_EXPORT2
00623
u_unescape(
const char *src,
00624 UChar *dest, int32_t destCapacity);
00625
00634 U_CDECL_BEGIN
00635 typedef UChar (*UNESCAPE_CHAR_AT)(int32_t offset,
void *context);
00636 U_CDECL_END
00637
00666 U_CAPI
UChar32 U_EXPORT2
00667
u_unescapeAt(UNESCAPE_CHAR_AT charAt,
00668 int32_t *offset,
00669 int32_t length,
00670
void *context);
00671
00692 U_CAPI int32_t U_EXPORT2
00693
u_strToUpper(UChar *dest, int32_t destCapacity,
00694
const UChar *src, int32_t srcLength,
00695
const char *locale,
00696 UErrorCode *pErrorCode);
00697
00718 U_CAPI int32_t U_EXPORT2
00719
u_strToLower(UChar *dest, int32_t destCapacity,
00720
const UChar *src, int32_t srcLength,
00721
const char *locale,
00722 UErrorCode *pErrorCode);
00723
00762 U_CAPI int32_t U_EXPORT2
00763
u_strToTitle(UChar *dest, int32_t destCapacity,
00764
const UChar *src, int32_t srcLength,
00765 UBreakIterator *titleIter,
00766
const char *locale,
00767 UErrorCode *pErrorCode);
00768
00791 U_CAPI int32_t U_EXPORT2
00792
u_strFoldCase(UChar *dest, int32_t destCapacity,
00793
const UChar *src, int32_t srcLength,
00794 uint32_t options,
00795 UErrorCode *pErrorCode);
00796
00816 U_CAPI
wchar_t* U_EXPORT2
00817
u_strToWCS(
wchar_t *dest,
00818 int32_t destCapacity,
00819 int32_t *pDestLength,
00820
const UChar *src,
00821 int32_t srcLength,
00822 UErrorCode *pErrorCode);
00842 U_CAPI
UChar* U_EXPORT2
00843
u_strFromWCS(UChar *dest,
00844 int32_t destCapacity,
00845 int32_t *pDestLength,
00846
const wchar_t *src,
00847 int32_t srcLength,
00848 UErrorCode *pErrorCode);
00868 U_CAPI
char* U_EXPORT2
00869
u_strToUTF8(
char *dest,
00870 int32_t destCapacity,
00871 int32_t *pDestLength,
00872
const UChar *src,
00873 int32_t srcLength,
00874 UErrorCode *pErrorCode);
00875
00895 U_CAPI
UChar* U_EXPORT2
00896
u_strFromUTF8(UChar *dest,
00897 int32_t destCapacity,
00898 int32_t *pDestLength,
00899
const char *src,
00900 int32_t srcLength,
00901 UErrorCode *pErrorCode);
00902
00922 U_CAPI
UChar32* U_EXPORT2
00923
u_strToUTF32(UChar32 *dest,
00924 int32_t destCapacity,
00925 int32_t *pDestLength,
00926
const UChar *src,
00927 int32_t srcLength,
00928 UErrorCode *pErrorCode);
00929
00949 U_CAPI
UChar* U_EXPORT2
00950
u_strFromUTF32(UChar *dest,
00951 int32_t destCapacity,
00952 int32_t *pDestLength,
00953
const UChar32 *src,
00954 int32_t srcLength,
00955 UErrorCode *pErrorCode);
00956
00957
#endif