]>
git.saurik.com Git - apple/icu.git/blob - icuSources/tools/genrb/ustr.h
2 *******************************************************************************
4 * Copyright (C) 1998-2012, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
11 * Modification History:
13 * Date Name Description
14 * 05/28/99 stephen Creation.
15 *******************************************************************************
21 #include "unicode/utypes.h"
23 #define U_APPEND_CHAR32(c,target,len) { \
26 *(target)++ = (UChar) c; \
31 target[0] = U16_LEAD(c); \
32 target[1] = U16_TRAIL(c); \
38 #define U_APPEND_CHAR32_ONLY(c,target) { \
41 *(target)++ = (UChar) c; \
45 target[0] = U16_LEAD(c); \
46 target[1] = U16_TRAIL(c); \
51 /* A C representation of a string "object" (to avoid realloc all the time) */
58 U_CFUNC
void ustr_init(struct UString
*s
);
61 ustr_initChars(struct UString
*s
, const char* source
, int32_t length
, UErrorCode
*status
);
63 U_CFUNC
void ustr_deinit(struct UString
*s
);
65 U_CFUNC
void ustr_setlen(struct UString
*s
, int32_t len
, UErrorCode
*status
);
67 U_CFUNC
void ustr_cpy(struct UString
*dst
, const struct UString
*src
,
70 U_CFUNC
void ustr_cat(struct UString
*dst
, const struct UString
*src
,
73 U_CFUNC
void ustr_ncat(struct UString
*dst
, const struct UString
*src
,
74 int32_t n
, UErrorCode
*status
);
76 U_CFUNC
void ustr_ucat(struct UString
*dst
, UChar c
, UErrorCode
*status
);
77 U_CFUNC
void ustr_u32cat(struct UString
*dst
, UChar32 c
, UErrorCode
*status
);
78 U_CFUNC
void ustr_uscat(struct UString
*dst
, const UChar
* src
,int len
,UErrorCode
*status
);