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

ustring.h

Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1998-2004, 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/putil.h"
00021 #include "unicode/uiter.h"
00022 
00024 #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
00025 #   define UBRK_TYPEDEF_UBREAK_ITERATOR
00026     typedef void UBreakIterator;
00027 #endif
00028 
00080 U_STABLE int32_t U_EXPORT2
00081 u_strlen(const UChar *s);
00082 
00096 U_STABLE int32_t U_EXPORT2
00097 u_countChar32(const UChar *s, int32_t length);
00098 
00117 U_STABLE UBool U_EXPORT2
00118 u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number);
00119 
00130 U_STABLE UChar* U_EXPORT2
00131 u_strcat(UChar     *dst, 
00132     const UChar     *src);
00133 
00148 U_STABLE UChar* U_EXPORT2
00149 u_strncat(UChar     *dst, 
00150      const UChar     *src, 
00151      int32_t     n);
00152 
00173 U_STABLE UChar * U_EXPORT2
00174 u_strstr(const UChar *s, const UChar *substring);
00175 
00197 U_STABLE UChar * U_EXPORT2
00198 u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength);
00199 
00217 U_STABLE UChar * U_EXPORT2
00218 u_strchr(const UChar *s, UChar c);
00219 
00237 U_STABLE UChar * U_EXPORT2
00238 u_strchr32(const UChar *s, UChar32 c);
00239 
00260 U_STABLE UChar * U_EXPORT2
00261 u_strrstr(const UChar *s, const UChar *substring);
00262 
00284 U_STABLE UChar * U_EXPORT2
00285 u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength);
00286 
00304 U_STABLE UChar * U_EXPORT2
00305 u_strrchr(const UChar *s, UChar c);
00306 
00324 U_STABLE UChar * U_EXPORT2
00325 u_strrchr32(const UChar *s, UChar32 c);
00326 
00339 U_STABLE UChar * U_EXPORT2
00340 u_strpbrk(const UChar *string, const UChar *matchSet);
00341 
00355 U_STABLE int32_t U_EXPORT2
00356 u_strcspn(const UChar *string, const UChar *matchSet);
00357 
00371 U_STABLE int32_t U_EXPORT2
00372 u_strspn(const UChar *string, const UChar *matchSet);
00373 
00399 U_STABLE UChar * U_EXPORT2
00400 u_strtok_r(UChar    *src, 
00401      const UChar    *delim,
00402            UChar   **saveState);
00403 
00414 U_STABLE int32_t  U_EXPORT2
00415 u_strcmp(const UChar     *s1, 
00416          const UChar     *s2);
00417 
00429 U_STABLE int32_t U_EXPORT2
00430 u_strcmpCodePointOrder(const UChar *s1, const UChar *s2);
00431 
00459 U_STABLE int32_t U_EXPORT2
00460 u_strCompare(const UChar *s1, int32_t length1,
00461              const UChar *s2, int32_t length2,
00462              UBool codePointOrder);
00463 
00484 U_STABLE int32_t U_EXPORT2
00485 u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder);
00486 
00487 #ifndef U_COMPARE_CODE_POINT_ORDER
00488 /* see also unistr.h and unorm.h */
00494 #define U_COMPARE_CODE_POINT_ORDER  0x8000
00495 #endif
00496 
00537 U_STABLE int32_t U_EXPORT2
00538 u_strCaseCompare(const UChar *s1, int32_t length1,
00539                  const UChar *s2, int32_t length2,
00540                  uint32_t options,
00541                  UErrorCode *pErrorCode);
00542 
00555 U_STABLE int32_t U_EXPORT2
00556 u_strncmp(const UChar     *ucs1, 
00557      const UChar     *ucs2, 
00558      int32_t     n);
00559 
00573 U_STABLE int32_t U_EXPORT2
00574 u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n);
00575 
00595 U_STABLE int32_t U_EXPORT2
00596 u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options);
00597 
00619 U_STABLE int32_t U_EXPORT2
00620 u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options);
00621 
00643 U_STABLE int32_t U_EXPORT2
00644 u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options);
00645 
00654 U_STABLE UChar* U_EXPORT2
00655 u_strcpy(UChar     *dst, 
00656     const UChar     *src);
00657 
00669 U_STABLE UChar* U_EXPORT2
00670 u_strncpy(UChar     *dst, 
00671      const UChar     *src, 
00672      int32_t     n);
00673 
00674 #if !UCONFIG_NO_CONVERSION
00675 
00686 U_STABLE UChar* U_EXPORT2 u_uastrcpy(UChar *dst,
00687                const char *src );
00688 
00701 U_STABLE UChar* U_EXPORT2 u_uastrncpy(UChar *dst,
00702             const char *src,
00703             int32_t n);
00704 
00715 U_STABLE char* U_EXPORT2 u_austrcpy(char *dst,
00716             const UChar *src );
00717 
00730 U_STABLE char* U_EXPORT2 u_austrncpy(char *dst,
00731             const UChar *src,
00732             int32_t n );
00733 
00734 #endif
00735 
00744 U_STABLE UChar* U_EXPORT2
00745 u_memcpy(UChar *dest, const UChar *src, int32_t count);
00746 
00755 U_STABLE UChar* U_EXPORT2
00756 u_memmove(UChar *dest, const UChar *src, int32_t count);
00757 
00767 U_STABLE UChar* U_EXPORT2
00768 u_memset(UChar *dest, UChar c, int32_t count);
00769 
00781 U_STABLE int32_t U_EXPORT2
00782 u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count);
00783 
00797 U_STABLE int32_t U_EXPORT2
00798 u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count);
00799 
00817 U_STABLE UChar* U_EXPORT2
00818 u_memchr(const UChar *s, UChar c, int32_t count);
00819 
00837 U_STABLE UChar* U_EXPORT2
00838 u_memchr32(const UChar *s, UChar32 c, int32_t count);
00839 
00857 U_STABLE UChar* U_EXPORT2
00858 u_memrchr(const UChar *s, UChar c, int32_t count);
00859 
00877 U_STABLE UChar* U_EXPORT2
00878 u_memrchr32(const UChar *s, UChar32 c, int32_t count);
00879 
00916 #if U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && U_CHARSET_FAMILY==U_ASCII_FAMILY
00917 #   define U_STRING_DECL(var, cs, length) static const wchar_t var[(length)+1]={ L ## cs }
00918 
00919 #   define U_STRING_INIT(var, cs, length)
00920 #elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY
00921 #   define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]={ (const UChar *)cs }
00922 
00923 #   define U_STRING_INIT(var, cs, length)
00924 #else
00925 #   define U_STRING_DECL(var, cs, length) static UChar var[(length)+1]
00926 
00927 #   define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1)
00928 #endif
00929 
00977 U_STABLE int32_t U_EXPORT2
00978 u_unescape(const char *src,
00979            UChar *dest, int32_t destCapacity);
00980 
00981 U_CDECL_BEGIN
00994 typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context);
00995 U_CDECL_END
00996 
01025 U_STABLE UChar32 U_EXPORT2
01026 u_unescapeAt(UNESCAPE_CHAR_AT charAt,
01027              int32_t *offset,
01028              int32_t length,
01029              void *context);
01030 
01051 U_STABLE int32_t U_EXPORT2
01052 u_strToUpper(UChar *dest, int32_t destCapacity,
01053              const UChar *src, int32_t srcLength,
01054              const char *locale,
01055              UErrorCode *pErrorCode);
01056 
01077 U_STABLE int32_t U_EXPORT2
01078 u_strToLower(UChar *dest, int32_t destCapacity,
01079              const UChar *src, int32_t srcLength,
01080              const char *locale,
01081              UErrorCode *pErrorCode);
01082 
01083 #if !UCONFIG_NO_BREAK_ITERATION
01084 
01123 U_STABLE int32_t U_EXPORT2
01124 u_strToTitle(UChar *dest, int32_t destCapacity,
01125              const UChar *src, int32_t srcLength,
01126              UBreakIterator *titleIter,
01127              const char *locale,
01128              UErrorCode *pErrorCode);
01129 
01130 #endif
01131 
01154 U_STABLE int32_t U_EXPORT2
01155 u_strFoldCase(UChar *dest, int32_t destCapacity,
01156               const UChar *src, int32_t srcLength,
01157               uint32_t options,
01158               UErrorCode *pErrorCode);
01159 
01179 U_STABLE wchar_t* U_EXPORT2
01180 u_strToWCS(wchar_t *dest, 
01181            int32_t destCapacity,
01182            int32_t *pDestLength,
01183            const UChar *src, 
01184            int32_t srcLength,
01185            UErrorCode *pErrorCode);
01205 U_STABLE UChar* U_EXPORT2
01206 u_strFromWCS(UChar   *dest,
01207              int32_t destCapacity, 
01208              int32_t *pDestLength,
01209              const wchar_t *src,
01210              int32_t srcLength,
01211              UErrorCode *pErrorCode);
01231 U_STABLE char* U_EXPORT2 
01232 u_strToUTF8(char *dest,           
01233             int32_t destCapacity,
01234             int32_t *pDestLength,
01235             const UChar *src, 
01236             int32_t srcLength,
01237             UErrorCode *pErrorCode);
01238 
01258 U_STABLE UChar* U_EXPORT2
01259 u_strFromUTF8(UChar *dest,             
01260               int32_t destCapacity,
01261               int32_t *pDestLength,
01262               const char *src, 
01263               int32_t srcLength,
01264               UErrorCode *pErrorCode);
01265 
01285 U_STABLE UChar32* U_EXPORT2 
01286 u_strToUTF32(UChar32 *dest, 
01287              int32_t  destCapacity,
01288              int32_t  *pDestLength,
01289              const UChar *src, 
01290              int32_t  srcLength,
01291              UErrorCode *pErrorCode);
01292 
01312 U_STABLE UChar* U_EXPORT2 
01313 u_strFromUTF32(UChar   *dest,
01314                int32_t destCapacity, 
01315                int32_t *pDestLength,
01316                const UChar32 *src,
01317                int32_t srcLength,
01318                UErrorCode *pErrorCode);
01319 
01320 #endif

Generated on Tue Jul 26 00:40:03 2005 for ICU 3.2 by  doxygen 1.3.9.1