Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

ustring.h

Go to the documentation of this file.
00001 /* 00002 ********************************************************************** 00003 * Copyright (C) 1998-2003, International Business Machines 00004 * Corporation and others. All Rights Reserved. 00005 ********************************************************************** 00006 * 00007 * File ustring.h 00008 * 00009 * Modification History: 00010 * 00011 * Date Name Description 00012 * 12/07/98 bertrand Creation. 00013 ****************************************************************************** 00014 */ 00015 00016 #ifndef USTRING_H 00017 #define USTRING_H 00018 00019 #include "unicode/utypes.h" 00020 #include "unicode/uiter.h" 00021 00023 #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR 00024 # define UBRK_TYPEDEF_UBREAK_ITERATOR 00025 typedef void *UBreakIterator; 00026 #endif 00027 00079 U_CAPI int32_t U_EXPORT2 00080 u_strlen(const UChar *s); 00081 00095 U_CAPI int32_t U_EXPORT2 00096 u_countChar32(const UChar *s, int32_t length); 00097 00116 U_CAPI UBool U_EXPORT2 00117 u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number); 00118 00129 U_CAPI UChar* U_EXPORT2 00130 u_strcat(UChar *dst, 00131 const UChar *src); 00132 00147 U_CAPI UChar* U_EXPORT2 00148 u_strncat(UChar *dst, 00149 const UChar *src, 00150 int32_t n); 00151 00172 U_CAPI UChar * U_EXPORT2 00173 u_strstr(const UChar *s, const UChar *substring); 00174 00196 U_CAPI UChar * U_EXPORT2 00197 u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); 00198 00216 U_CAPI UChar * U_EXPORT2 00217 u_strchr(const UChar *s, UChar c); 00218 00236 U_CAPI UChar * U_EXPORT2 00237 u_strchr32(const UChar *s, UChar32 c); 00238 00259 U_CAPI UChar * U_EXPORT2 00260 u_strrstr(const UChar *s, const UChar *substring); 00261 00283 U_CAPI UChar * U_EXPORT2 00284 u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); 00285 00303 U_CAPI UChar * U_EXPORT2 00304 u_strrchr(const UChar *s, UChar c); 00305 00323 U_CAPI UChar * U_EXPORT2 00324 u_strrchr32(const UChar *s, UChar32 c); 00325 00338 U_CAPI UChar * U_EXPORT2 00339 u_strpbrk(const UChar *string, const UChar *matchSet); 00340 00354 U_CAPI int32_t U_EXPORT2 00355 u_strcspn(const UChar *string, const UChar *matchSet); 00356 00370 U_CAPI int32_t U_EXPORT2 00371 u_strspn(const UChar *string, const UChar *matchSet); 00372 00398 U_CAPI UChar * U_EXPORT2 00399 u_strtok_r(UChar *src, 00400 const UChar *delim, 00401 UChar **saveState); 00402 00413 U_CAPI int32_t U_EXPORT2 00414 u_strcmp(const UChar *s1, 00415 const UChar *s2); 00416 00428 U_CAPI int32_t U_EXPORT2 00429 u_strcmpCodePointOrder(const UChar *s1, const UChar *s2); 00430 00458 U_CAPI int32_t U_EXPORT2 00459 u_strCompare(const UChar *s1, int32_t length1, 00460 const UChar *s2, int32_t length2, 00461 UBool codePointOrder); 00462 00483 U_CAPI int32_t U_EXPORT2 00484 u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder); 00485 00486 #ifndef U_COMPARE_CODE_POINT_ORDER 00487 /* see also unistr.h and unorm.h */ 00493 #define U_COMPARE_CODE_POINT_ORDER 0x8000 00494 #endif 00495 00536 U_CAPI int32_t U_EXPORT2 00537 u_strCaseCompare(const UChar *s1, int32_t length1, 00538 const UChar *s2, int32_t length2, 00539 uint32_t options, 00540 UErrorCode *pErrorCode); 00541 00554 U_CAPI int32_t U_EXPORT2 00555 u_strncmp(const UChar *ucs1, 00556 const UChar *ucs2, 00557 int32_t n); 00558 00572 U_CAPI int32_t U_EXPORT2 00573 u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n); 00574 00594 U_CAPI int32_t U_EXPORT2 00595 u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options); 00596 00618 U_CAPI int32_t U_EXPORT2 00619 u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options); 00620 00642 U_CAPI int32_t U_EXPORT2 00643 u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options); 00644 00653 U_CAPI UChar* U_EXPORT2 00654 u_strcpy(UChar *dst, 00655 const UChar *src); 00656 00668 U_CAPI UChar* U_EXPORT2 00669 u_strncpy(UChar *dst, 00670 const UChar *src, 00671 int32_t n); 00672 00683 U_CAPI UChar* U_EXPORT2 u_uastrcpy(UChar *dst, 00684 const char *src ); 00685 00698 U_CAPI UChar* U_EXPORT2 u_uastrncpy(UChar *dst, 00699 const char *src, 00700 int32_t n); 00701 00712 U_CAPI char* U_EXPORT2 u_austrcpy(char *dst, 00713 const UChar *src ); 00714 00727 U_CAPI char* U_EXPORT2 u_austrncpy(char *dst, 00728 const UChar *src, 00729 int32_t n ); 00730 00739 U_CAPI UChar* U_EXPORT2 00740 u_memcpy(UChar *dest, const UChar *src, int32_t count); 00741 00750 U_CAPI UChar* U_EXPORT2 00751 u_memmove(UChar *dest, const UChar *src, int32_t count); 00752 00762 U_CAPI UChar* U_EXPORT2 00763 u_memset(UChar *dest, UChar c, int32_t count); 00764 00776 U_CAPI int32_t U_EXPORT2 00777 u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count); 00778 00792 U_CAPI int32_t U_EXPORT2 00793 u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count); 00794 00812 U_CAPI UChar* U_EXPORT2 00813 u_memchr(const UChar *s, UChar c, int32_t count); 00814 00832 U_CAPI UChar* U_EXPORT2 00833 u_memchr32(const UChar *s, UChar32 c, int32_t count); 00834 00852 U_CAPI UChar* U_EXPORT2 00853 u_memrchr(const UChar *s, UChar c, int32_t count); 00854 00872 U_CAPI UChar* U_EXPORT2 00873 u_memrchr32(const UChar *s, UChar32 c, int32_t count); 00874 00911 #if U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && U_CHARSET_FAMILY==U_ASCII_FAMILY 00912 # define U_STRING_DECL(var, cs, length) static const wchar_t var[(length)+1]={ L ## cs } 00913 00914 # define U_STRING_INIT(var, cs, length) 00915 #elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY 00916 # define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]={ (const UChar *)cs } 00917 00918 # define U_STRING_INIT(var, cs, length) 00919 #else 00920 # define U_STRING_DECL(var, cs, length) static UChar var[(length)+1] 00921 00922 # define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1) 00923 #endif 00924 00972 U_CAPI int32_t U_EXPORT2 00973 u_unescape(const char *src, 00974 UChar *dest, int32_t destCapacity); 00975 00976 U_CDECL_BEGIN 00989 typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context); 00990 U_CDECL_END 00991 01020 U_CAPI UChar32 U_EXPORT2 01021 u_unescapeAt(UNESCAPE_CHAR_AT charAt, 01022 int32_t *offset, 01023 int32_t length, 01024 void *context); 01025 01046 U_CAPI int32_t U_EXPORT2 01047 u_strToUpper(UChar *dest, int32_t destCapacity, 01048 const UChar *src, int32_t srcLength, 01049 const char *locale, 01050 UErrorCode *pErrorCode); 01051 01072 U_CAPI int32_t U_EXPORT2 01073 u_strToLower(UChar *dest, int32_t destCapacity, 01074 const UChar *src, int32_t srcLength, 01075 const char *locale, 01076 UErrorCode *pErrorCode); 01077 01078 #if !UCONFIG_NO_BREAK_ITERATION 01079 01118 U_CAPI int32_t U_EXPORT2 01119 u_strToTitle(UChar *dest, int32_t destCapacity, 01120 const UChar *src, int32_t srcLength, 01121 UBreakIterator *titleIter, 01122 const char *locale, 01123 UErrorCode *pErrorCode); 01124 01125 #endif 01126 01149 U_CAPI int32_t U_EXPORT2 01150 u_strFoldCase(UChar *dest, int32_t destCapacity, 01151 const UChar *src, int32_t srcLength, 01152 uint32_t options, 01153 UErrorCode *pErrorCode); 01154 01174 U_CAPI wchar_t* U_EXPORT2 01175 u_strToWCS(wchar_t *dest, 01176 int32_t destCapacity, 01177 int32_t *pDestLength, 01178 const UChar *src, 01179 int32_t srcLength, 01180 UErrorCode *pErrorCode); 01200 U_CAPI UChar* U_EXPORT2 01201 u_strFromWCS(UChar *dest, 01202 int32_t destCapacity, 01203 int32_t *pDestLength, 01204 const wchar_t *src, 01205 int32_t srcLength, 01206 UErrorCode *pErrorCode); 01226 U_CAPI char* U_EXPORT2 01227 u_strToUTF8(char *dest, 01228 int32_t destCapacity, 01229 int32_t *pDestLength, 01230 const UChar *src, 01231 int32_t srcLength, 01232 UErrorCode *pErrorCode); 01233 01253 U_CAPI UChar* U_EXPORT2 01254 u_strFromUTF8(UChar *dest, 01255 int32_t destCapacity, 01256 int32_t *pDestLength, 01257 const char *src, 01258 int32_t srcLength, 01259 UErrorCode *pErrorCode); 01260 01280 U_CAPI UChar32* U_EXPORT2 01281 u_strToUTF32(UChar32 *dest, 01282 int32_t destCapacity, 01283 int32_t *pDestLength, 01284 const UChar *src, 01285 int32_t srcLength, 01286 UErrorCode *pErrorCode); 01287 01307 U_CAPI UChar* U_EXPORT2 01308 u_strFromUTF32(UChar *dest, 01309 int32_t destCapacity, 01310 int32_t *pDestLength, 01311 const UChar32 *src, 01312 int32_t srcLength, 01313 UErrorCode *pErrorCode); 01314 01315 #endif

Generated on Wed Jul 28 09:15:54 2004 for ICU 2.8 by doxygen 1.3.7