Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ustring.h

Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1998-2001, 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 #include "unicode/utypes.h"
00019 
00021 #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
00022 #   define UBRK_TYPEDEF_UBREAK_ITERATOR
00023     typedef void *UBreakIterator;
00024 #endif
00025 
00077 U_CAPI int32_t U_EXPORT2
00078 u_strlen(const UChar *s);
00079 
00093 U_CAPI int32_t U_EXPORT2
00094 u_countChar32(const UChar *s, int32_t length);
00095 
00114 U_CAPI UBool U_EXPORT2
00115 u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number);
00116 
00127 U_CAPI UChar* U_EXPORT2
00128 u_strcat(UChar     *dst, 
00129     const UChar     *src);
00130 
00145 U_CAPI UChar* U_EXPORT2
00146 u_strncat(UChar     *dst, 
00147      const UChar     *src, 
00148      int32_t     n);
00149 
00170 U_CAPI UChar * U_EXPORT2
00171 u_strstr(const UChar *s, const UChar *substring);
00172 
00194 U_CAPI UChar * U_EXPORT2
00195 u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength);
00196 
00214 U_CAPI UChar * U_EXPORT2
00215 u_strchr(const UChar *s, UChar c);
00216 
00234 U_CAPI UChar * U_EXPORT2
00235 u_strchr32(const UChar *s, UChar32 c);
00236 
00257 U_CAPI UChar * U_EXPORT2
00258 u_strrstr(const UChar *s, const UChar *substring);
00259 
00281 U_CAPI UChar * U_EXPORT2
00282 u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength);
00283 
00301 U_CAPI UChar * U_EXPORT2
00302 u_strrchr(const UChar *s, UChar c);
00303 
00321 U_CAPI UChar * U_EXPORT2
00322 u_strrchr32(const UChar *s, UChar32 c);
00323 
00336 U_CAPI UChar * U_EXPORT2
00337 u_strpbrk(const UChar *string, const UChar *matchSet);
00338 
00352 U_CAPI int32_t U_EXPORT2
00353 u_strcspn(const UChar *string, const UChar *matchSet);
00354 
00368 U_CAPI int32_t U_EXPORT2
00369 u_strspn(const UChar *string, const UChar *matchSet);
00370 
00396 U_CAPI UChar * U_EXPORT2
00397 u_strtok_r(UChar    *src, 
00398      const UChar    *delim,
00399            UChar   **saveState);
00400 
00411 U_CAPI int32_t  U_EXPORT2
00412 u_strcmp(const UChar     *s1, 
00413     const UChar     *s2);
00414 
00426 U_CAPI int32_t U_EXPORT2
00427 u_strcmpCodePointOrder(const UChar *s1, const UChar *s2);
00428 
00456 U_CAPI int32_t U_EXPORT2
00457 u_strCompare(const UChar *s1, int32_t length1,
00458              const UChar *s2, int32_t length2,
00459              UBool codePointOrder);
00460 
00461 #ifndef U_COMPARE_CODE_POINT_ORDER
00462 /* see also unistr.h and unorm.h */
00468 #define U_COMPARE_CODE_POINT_ORDER  0x8000
00469 #endif
00470 
00508 U_CAPI int32_t U_EXPORT2
00509 u_strCaseCompare(const UChar *s1, int32_t length1,
00510                  const UChar *s2, int32_t length2,
00511                  uint32_t options,
00512                  UErrorCode *pErrorCode);
00513 
00526 U_CAPI int32_t U_EXPORT2
00527 u_strncmp(const UChar     *ucs1, 
00528      const UChar     *ucs2, 
00529      int32_t     n);
00530 
00544 U_CAPI int32_t U_EXPORT2
00545 u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n);
00546 
00566 U_CAPI int32_t U_EXPORT2
00567 u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options);
00568 
00590 U_CAPI int32_t U_EXPORT2
00591 u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options);
00592 
00614 U_CAPI int32_t U_EXPORT2
00615 u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options);
00616 
00625 U_CAPI UChar* U_EXPORT2
00626 u_strcpy(UChar     *dst, 
00627     const UChar     *src);
00628 
00640 U_CAPI UChar* U_EXPORT2
00641 u_strncpy(UChar     *dst, 
00642      const UChar     *src, 
00643      int32_t     n);
00644 
00655 U_CAPI UChar* U_EXPORT2 u_uastrcpy(UChar *dst,
00656                const char *src );
00657 
00670 U_CAPI UChar* U_EXPORT2 u_uastrncpy(UChar *dst,
00671             const char *src,
00672             int32_t n);
00673 
00684 U_CAPI char* U_EXPORT2 u_austrcpy(char *dst,
00685             const UChar *src );
00686 
00699 U_CAPI char* U_EXPORT2 u_austrncpy(char *dst,
00700             const UChar *src,
00701             int32_t n );
00702 
00711 U_CAPI UChar* U_EXPORT2
00712 u_memcpy(UChar *dest, const UChar *src, int32_t count);
00713 
00722 U_CAPI UChar* U_EXPORT2
00723 u_memmove(UChar *dest, const UChar *src, int32_t count);
00724 
00734 U_CAPI UChar* U_EXPORT2
00735 u_memset(UChar *dest, UChar c, int32_t count);
00736 
00748 U_CAPI int32_t U_EXPORT2
00749 u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count);
00750 
00764 U_CAPI int32_t U_EXPORT2
00765 u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count);
00766 
00784 U_CAPI UChar* U_EXPORT2
00785 u_memchr(const UChar *s, UChar c, int32_t count);
00786 
00804 U_CAPI UChar* U_EXPORT2
00805 u_memchr32(const UChar *s, UChar32 c, int32_t count);
00806 
00824 U_CAPI UChar* U_EXPORT2
00825 u_memrchr(const UChar *s, UChar c, int32_t count);
00826 
00844 U_CAPI UChar* U_EXPORT2
00845 u_memrchr32(const UChar *s, UChar32 c, int32_t count);
00846 
00883 #if U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && U_CHARSET_FAMILY==U_ASCII_FAMILY
00884 #   define U_STRING_DECL(var, cs, length) static const wchar_t var[(length)+1]={ L ## cs }
00885 
00886 #   define U_STRING_INIT(var, cs, length)
00887 #elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY
00888 #   define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]={ (const UChar *)cs }
00889 
00890 #   define U_STRING_INIT(var, cs, length)
00891 #else
00892 #   define U_STRING_DECL(var, cs, length) static UChar var[(length)+1]
00893 
00894 #   define U_STRING_INIT(var, cs, length) u_charsToUChars(cs, var, length+1)
00895 #endif
00896 
00944 U_CAPI int32_t U_EXPORT2
00945 u_unescape(const char *src,
00946            UChar *dest, int32_t destCapacity);
00947 
00948 U_CDECL_BEGIN
00961 typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context);
00962 U_CDECL_END
00963 
00992 U_CAPI UChar32 U_EXPORT2
00993 u_unescapeAt(UNESCAPE_CHAR_AT charAt,
00994              int32_t *offset,
00995              int32_t length,
00996              void *context);
00997 
01018 U_CAPI int32_t U_EXPORT2
01019 u_strToUpper(UChar *dest, int32_t destCapacity,
01020              const UChar *src, int32_t srcLength,
01021              const char *locale,
01022              UErrorCode *pErrorCode);
01023 
01044 U_CAPI int32_t U_EXPORT2
01045 u_strToLower(UChar *dest, int32_t destCapacity,
01046              const UChar *src, int32_t srcLength,
01047              const char *locale,
01048              UErrorCode *pErrorCode);
01049 
01050 #if !UCONFIG_NO_BREAK_ITERATION
01051 
01090 U_CAPI int32_t U_EXPORT2
01091 u_strToTitle(UChar *dest, int32_t destCapacity,
01092              const UChar *src, int32_t srcLength,
01093              UBreakIterator *titleIter,
01094              const char *locale,
01095              UErrorCode *pErrorCode);
01096 
01097 #endif
01098 
01121 U_CAPI int32_t U_EXPORT2
01122 u_strFoldCase(UChar *dest, int32_t destCapacity,
01123               const UChar *src, int32_t srcLength,
01124               uint32_t options,
01125               UErrorCode *pErrorCode);
01126 
01146 U_CAPI wchar_t* U_EXPORT2
01147 u_strToWCS(wchar_t *dest, 
01148            int32_t destCapacity,
01149            int32_t *pDestLength,
01150            const UChar *src, 
01151            int32_t srcLength,
01152            UErrorCode *pErrorCode);
01172 U_CAPI UChar* U_EXPORT2
01173 u_strFromWCS(UChar   *dest,
01174              int32_t destCapacity, 
01175              int32_t *pDestLength,
01176              const wchar_t *src,
01177              int32_t srcLength,
01178              UErrorCode *pErrorCode);
01198 U_CAPI char* U_EXPORT2 
01199 u_strToUTF8(char *dest,           
01200             int32_t destCapacity,
01201             int32_t *pDestLength,
01202             const UChar *src, 
01203             int32_t srcLength,
01204             UErrorCode *pErrorCode);
01205 
01225 U_CAPI UChar* U_EXPORT2
01226 u_strFromUTF8(UChar *dest,             
01227               int32_t destCapacity,
01228               int32_t *pDestLength,
01229               const char *src, 
01230               int32_t srcLength,
01231               UErrorCode *pErrorCode);
01232 
01252 U_CAPI UChar32* U_EXPORT2 
01253 u_strToUTF32(UChar32 *dest, 
01254              int32_t  destCapacity,
01255              int32_t  *pDestLength,
01256              const UChar *src, 
01257              int32_t  srcLength,
01258              UErrorCode *pErrorCode);
01259 
01279 U_CAPI UChar* U_EXPORT2 
01280 u_strFromUTF32(UChar   *dest,
01281                int32_t destCapacity, 
01282                int32_t *pDestLength,
01283                const UChar32 *src,
01284                int32_t srcLength,
01285                UErrorCode *pErrorCode);
01286 
01287 #endif

Generated on Wed Dec 18 16:50:06 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001