2 *****************************************************************************************
3 * Copyright (C) 2010 Apple Inc. All Rights Reserved.
4 *****************************************************************************************
7 #include <unicode/utypes.h>
8 #include <unicode/ubrk.h>
9 #include <unicode/uchar.h>
10 #include <unicode/uidna.h>
11 #include <unicode/uscript.h>
12 #include <unicode/ustring.h>
13 #include <unicode/utf8.h>
14 #include <unicode/brkiter.h>
15 #include <unicode/unistr.h>
16 #include <unicode/locid.h>
22 * hdr: common/unicode/uchar.h
25 U_CAPI
int8_t U_EXPORT2
26 u_charType_4_0(UChar32 c
)
35 * hdr: common/unicode/uchar.h
38 U_CAPI UBool U_EXPORT2
39 u_isUWhiteSpace_4_0(UChar32 c
)
41 return u_isUWhiteSpace(c
);
46 * hdr: common/unicode/uchar.h
49 U_CAPI UBool U_EXPORT2
50 u_isprint_4_0(UChar32 c
)
57 * hdr: common/unicode/uchar.h
60 U_CAPI UBool U_EXPORT2
61 u_isWhitespace_4_0(UChar32 c
)
63 return u_isWhitespace(c
);
68 * hdr: common/unicode/uchar.h
71 U_CAPI UBool U_EXPORT2
72 u_isspace_4_0(UChar32 c
)
79 * hdr: common/unicode/uchar.h
82 U_CAPI UChar32 U_EXPORT2
83 u_foldCase_4_0(UChar32 c
, uint32_t options
) {
84 return u_foldCase(c
, options
);
88 * imp: common/uprops.cpp
89 * hdr: common/unicode/uchar.h
92 U_CAPI UBool U_EXPORT2
93 u_hasBinaryProperty_4_0(UChar32 c
, UProperty which
)
95 return u_hasBinaryProperty(c
, which
);
99 * imp: common/propname.cpp
100 * hdr: common/unicode/uchar.h
103 U_CAPI
int32_t U_EXPORT2
104 u_getPropertyValueEnum_4_0(UProperty property
,
107 return u_getPropertyValueEnum(property
, alias
);
111 * imp: common/uchar.c
112 * hdr: common/unicode/uscript.h
115 U_CAPI UScriptCode U_EXPORT2
116 uscript_getScript_4_0(UChar32 codepoint
, UErrorCode
*err
)
119 return uscript_getScript(codepoint
, err
);
123 * imp: common/ustrcase.c
124 * hdr: common/unicode/ustring.h
127 U_CAPI
int32_t U_EXPORT2
128 u_memcasecmp_4_0(const UChar
*s1
, const UChar
*s2
, int32_t length
, uint32_t options
) {
129 return u_memcasecmp(s1
, s2
, length
, options
);
133 * imp: common/utypes.c
134 * hdr: common/unicode/utypes.h
137 U_CAPI
const char * U_EXPORT2
138 u_errorName_4_0(UErrorCode code
)
140 return u_errorName(code
);
144 * imp: common/ubrk.cpp
145 * hdr: common/unicode/ubrk.h
147 * #if !UCONFIG_NO_BREAK_ITERATION
148 * (don't actually conditionalize this, if the underlying library is not
149 * built with break iteration, we want to fail at build time, not runtime)
151 U_CAPI UBreakIterator
* U_EXPORT2
152 ubrk_open_4_0(UBreakIteratorType type
,
158 return ubrk_open(type
, locale
, text
, textLength
, status
);
162 * imp: common/ubrk.cpp
163 * hdr: common/unicode/ubrk.h
165 * #if !UCONFIG_NO_BREAK_ITERATION
166 * (don't actually conditionalize this, if the underlying library is not
167 * built with break iteration, we want to fail at build time, not runtime)
169 U_CAPI
void U_EXPORT2
170 ubrk_close_4_0(UBreakIterator
*bi
)
172 return ubrk_close(bi
);
176 * imp: common/ubrk.cpp
177 * hdr: common/unicode/ubrk.h
179 * #if !UCONFIG_NO_BREAK_ITERATION
180 * (don't actually conditionalize this, if the underlying library is not
181 * built with break iteration, we want to fail at build time, not runtime)
183 U_CAPI
void U_EXPORT2
184 ubrk_setText_4_0(UBreakIterator
* bi
,
189 return ubrk_setText(bi
, text
, textLength
, status
);
193 * imp: common/ubrk.cpp
194 * hdr: common/unicode/ubrk.h
196 * #if !UCONFIG_NO_BREAK_ITERATION
197 * (don't actually conditionalize this, if the underlying library is not
198 * built with break iteration, we want to fail at build time, not runtime)
200 U_CAPI
int32_t U_EXPORT2
201 ubrk_first_4_0(UBreakIterator
*bi
)
203 return ubrk_first(bi
);
207 * imp: common/ubrk.cpp
208 * hdr: common/unicode/ubrk.h
210 * #if !UCONFIG_NO_BREAK_ITERATION
211 * (don't actually conditionalize this, if the underlying library is not
212 * built with break iteration, we want to fail at build time, not runtime)
214 U_CAPI
int32_t U_EXPORT2
215 ubrk_last_4_0(UBreakIterator
*bi
)
217 return ubrk_last(bi
);
221 * imp: common/ubrk.cpp
222 * hdr: common/unicode/ubrk.h
224 * #if !UCONFIG_NO_BREAK_ITERATION
225 * (don't actually conditionalize this, if the underlying library is not
226 * built with break iteration, we want to fail at build time, not runtime)
228 U_CAPI
int32_t U_EXPORT2
229 ubrk_next_4_0(UBreakIterator
*bi
)
231 return ubrk_next(bi
);
235 * imp: common/ubrk.cpp
236 * hdr: common/unicode/ubrk.h
238 * #if !UCONFIG_NO_BREAK_ITERATION
239 * (don't actually conditionalize this, if the underlying library is not
240 * built with break iteration, we want to fail at build time, not runtime)
242 U_CAPI
int32_t U_EXPORT2
243 ubrk_previous_4_0(UBreakIterator
*bi
)
245 return ubrk_previous(bi
);
249 * imp: common/ubrk.cpp
250 * hdr: common/unicode/ubrk.h
252 * #if !UCONFIG_NO_BREAK_ITERATION
253 * (don't actually conditionalize this, if the underlying library is not
254 * built with break iteration, we want to fail at build time, not runtime)
256 U_CAPI
int32_t U_EXPORT2
257 ubrk_preceding_4_0(UBreakIterator
*bi
,
260 return ubrk_preceding(bi
, offset
);
264 * imp: common/ubrk.cpp
265 * hdr: common/unicode/ubrk.h
267 * #if !UCONFIG_NO_BREAK_ITERATION
268 * (don't actually conditionalize this, if the underlying library is not
269 * built with break iteration, we want to fail at build time, not runtime)
271 U_CAPI
int32_t U_EXPORT2
272 ubrk_following_4_0(UBreakIterator
*bi
,
275 return ubrk_following(bi
, offset
);
280 * imp: common/uidna.cpp
281 * hdr: common/unicode/uidna.h
284 U_CAPI
int32_t U_EXPORT2
285 uidna_IDNToUnicode_4_0( const UChar
* src
, int32_t srcLength
,
286 UChar
* dest
, int32_t destCapacity
,
288 UParseError
* parseError
,
291 return uidna_IDNToUnicode(src
, srcLength
, dest
, destCapacity
, options
, parseError
, status
);
295 * imp: common/uidna.cpp
296 * hdr: common/unicode/uidna.h
299 U_CAPI
int32_t U_EXPORT2
300 uidna_IDNToASCII_4_0( const UChar
* src
, int32_t srcLength
,
301 UChar
* dest
, int32_t destCapacity
,
303 UParseError
* parseError
,
306 return uidna_IDNToASCII(src
, srcLength
, dest
, destCapacity
, options
, parseError
, status
);
311 * imp: common/utf_impl.c
312 * hdr: common/unicode/utf8.h
315 U_CAPI
int32_t U_EXPORT2
316 utf8_appendCharSafeBody_4_0(uint8_t *s
, int32_t i
, int32_t length
, UChar32 c
, UBool
*pIsError
)
318 return utf8_appendCharSafeBody(s
, i
, length
, c
, pIsError
);
325 * imp: common/locid.cpp
326 * hdr: common/unicode/locid.h
328 class __declspec(dllexport
) Locale
: public icu::Locale
{
331 Locale(const char* language
, const char* country
= 0, const char* variant
= 0, const char* keywordsAndValues
= 0)
332 : icu::Locale(language
, country
, variant
, keywordsAndValues
)
339 * imp: common/unistr.cpp
340 * hdr: common/unicode/unistr.h
342 class __declspec(dllexport
) UnicodeString
: public icu::UnicodeString
{
344 UnicodeString(UBool isTerminated
, const UChar
*text
, int32_t textLength
)
345 : icu::UnicodeString(isTerminated
, text
, textLength
)
349 UnicodeString(int32_t capacity
, UChar32 c
, int32_t count
)
350 : icu::UnicodeString(capacity
, c
, count
)
355 : icu::UnicodeString()
359 UChar
*getBuffer(int32_t minCapacity
)
361 return icu::UnicodeString::getBuffer(minCapacity
);
364 void releaseBuffer(int32_t newLength
=-1)
366 return icu::UnicodeString::releaseBuffer(newLength
);
372 * imp: common/brkiter.cpp
373 * hdr: common/unicode/brkiter.h
375 class __declspec(dllexport
) BreakIterator
: public icu::BreakIterator
{
378 static BreakIterator
* U_EXPORT2
379 createWordInstance(const icu_4_0::Locale
& where
, UErrorCode
& status
)
381 return static_cast<BreakIterator
*>(icu::BreakIterator::createWordInstance(where
, status
));
385 }; // end namespace icu_4_0