2 *****************************************************************************************
3 * Copyright (C) 2010 Apple Inc. All Rights Reserved.
4 *****************************************************************************************
7 #include "unicode/utypes.h"
9 #include <unicode/brkiter.h>
10 #include <unicode/locid.h>
11 #include <unicode/ubrk.h>
12 #include <unicode/uchar.h>
13 #include <unicode/uidna.h>
14 #include <unicode/uscript.h>
15 #include <unicode/ustring.h>
21 * hdr: common/unicode/uchar.h
24 U_CAPI
int8_t U_EXPORT2
25 u_charType_4_0(UChar32 c
)
34 * hdr: common/unicode/uchar.h
37 U_CAPI UBool U_EXPORT2
38 u_isUWhiteSpace_4_0(UChar32 c
)
40 return u_isUWhiteSpace(c
);
45 * hdr: common/unicode/uchar.h
48 U_CAPI UBool U_EXPORT2
49 u_isprint_4_0(UChar32 c
)
56 * hdr: common/unicode/uchar.h
59 U_CAPI UBool U_EXPORT2
60 u_isWhitespace_4_0(UChar32 c
)
62 return u_isWhitespace(c
);
67 * hdr: common/unicode/uchar.h
70 U_CAPI UBool U_EXPORT2
71 u_isspace_4_0(UChar32 c
)
78 * hdr: common/unicode/uchar.h
81 U_CAPI UChar32 U_EXPORT2
82 u_foldCase_4_0(UChar32 c
, uint32_t options
) {
83 return u_foldCase(c
, options
);
87 * imp: common/uprops.cpp
88 * hdr: common/unicode/uchar.h
91 U_CAPI UBool U_EXPORT2
92 u_hasBinaryProperty_4_0(UChar32 c
, UProperty which
)
94 return u_hasBinaryProperty(c
, which
);
98 * imp: common/propname.cpp
99 * hdr: common/unicode/uchar.h
102 U_CAPI
int32_t U_EXPORT2
103 u_getPropertyValueEnum_4_0(UProperty property
,
106 return u_getPropertyValueEnum(property
, alias
);
110 * imp: common/uchar.c
111 * hdr: common/unicode/uscript.h
114 U_CAPI UScriptCode U_EXPORT2
115 uscript_getScript_4_0(UChar32 codepoint
, UErrorCode
*err
)
118 return uscript_getScript(codepoint
, err
);
122 * imp: common/ustrcase.c
123 * hdr: common/unicode/ustring.h
126 U_CAPI
int32_t U_EXPORT2
127 u_memcasecmp_4_0(const UChar
*s1
, const UChar
*s2
, int32_t length
, uint32_t options
) {
128 return u_memcasecmp(s1
, s2
, length
, options
);
132 * imp: common/utypes.c
133 * hdr: common/unicode/utypes.h
136 U_CAPI
const char * U_EXPORT2
137 u_errorName_4_0(UErrorCode code
)
139 return u_errorName(code
);
143 * imp: common/ubrk.cpp
144 * hdr: common/unicode/ubrk.h
146 * #if !UCONFIG_NO_BREAK_ITERATION
147 * (don't actually conditionalize this, if the underlying library is not
148 * built with break iteration, we want to fail at build time, not runtime)
150 U_CAPI UBreakIterator
* U_EXPORT2
151 ubrk_open_4_0(UBreakIteratorType type
,
157 return ubrk_open(type
, locale
, text
, textLength
, status
);
161 * imp: common/ubrk.cpp
162 * hdr: common/unicode/ubrk.h
164 * #if !UCONFIG_NO_BREAK_ITERATION
165 * (don't actually conditionalize this, if the underlying library is not
166 * built with break iteration, we want to fail at build time, not runtime)
168 U_CAPI
void U_EXPORT2
169 ubrk_close_4_0(UBreakIterator
*bi
)
171 return ubrk_close(bi
);
175 * imp: common/ubrk.cpp
176 * hdr: common/unicode/ubrk.h
178 * #if !UCONFIG_NO_BREAK_ITERATION
179 * (don't actually conditionalize this, if the underlying library is not
180 * built with break iteration, we want to fail at build time, not runtime)
182 U_CAPI
void U_EXPORT2
183 ubrk_setText_4_0(UBreakIterator
* bi
,
188 return ubrk_setText(bi
, text
, textLength
, status
);
192 * imp: common/ubrk.cpp
193 * hdr: common/unicode/ubrk.h
195 * #if !UCONFIG_NO_BREAK_ITERATION
196 * (don't actually conditionalize this, if the underlying library is not
197 * built with break iteration, we want to fail at build time, not runtime)
199 U_CAPI
int32_t U_EXPORT2
200 ubrk_first_4_0(UBreakIterator
*bi
)
202 return ubrk_first(bi
);
206 * imp: common/ubrk.cpp
207 * hdr: common/unicode/ubrk.h
209 * #if !UCONFIG_NO_BREAK_ITERATION
210 * (don't actually conditionalize this, if the underlying library is not
211 * built with break iteration, we want to fail at build time, not runtime)
213 U_CAPI
int32_t U_EXPORT2
214 ubrk_last_4_0(UBreakIterator
*bi
)
216 return ubrk_last(bi
);
220 * imp: common/ubrk.cpp
221 * hdr: common/unicode/ubrk.h
223 * #if !UCONFIG_NO_BREAK_ITERATION
224 * (don't actually conditionalize this, if the underlying library is not
225 * built with break iteration, we want to fail at build time, not runtime)
227 U_CAPI
int32_t U_EXPORT2
228 ubrk_next_4_0(UBreakIterator
*bi
)
230 return ubrk_next(bi
);
234 * imp: common/ubrk.cpp
235 * hdr: common/unicode/ubrk.h
237 * #if !UCONFIG_NO_BREAK_ITERATION
238 * (don't actually conditionalize this, if the underlying library is not
239 * built with break iteration, we want to fail at build time, not runtime)
241 U_CAPI
int32_t U_EXPORT2
242 ubrk_previous_4_0(UBreakIterator
*bi
)
244 return ubrk_previous(bi
);
248 * imp: common/ubrk.cpp
249 * hdr: common/unicode/ubrk.h
251 * #if !UCONFIG_NO_BREAK_ITERATION
252 * (don't actually conditionalize this, if the underlying library is not
253 * built with break iteration, we want to fail at build time, not runtime)
255 U_CAPI
int32_t U_EXPORT2
256 ubrk_preceding_4_0(UBreakIterator
*bi
,
259 return ubrk_preceding(bi
, offset
);
263 * imp: common/ubrk.cpp
264 * hdr: common/unicode/ubrk.h
266 * #if !UCONFIG_NO_BREAK_ITERATION
267 * (don't actually conditionalize this, if the underlying library is not
268 * built with break iteration, we want to fail at build time, not runtime)
270 U_CAPI
int32_t U_EXPORT2
271 ubrk_following_4_0(UBreakIterator
*bi
,
274 return ubrk_following(bi
, offset
);
279 * imp: common/uidna.cpp
280 * hdr: common/unicode/uidna.h
283 U_CAPI
int32_t U_EXPORT2
284 uidna_IDNToUnicode_4_0( const UChar
* src
, int32_t srcLength
,
285 UChar
* dest
, int32_t destCapacity
,
287 UParseError
* parseError
,
290 return uidna_IDNToUnicode(src
, srcLength
, dest
, destCapacity
, options
, parseError
, status
);
294 * imp: common/uidna.cpp
295 * hdr: common/unicode/uidna.h
298 U_CAPI
int32_t U_EXPORT2
299 uidna_IDNToASCII_4_0( const UChar
* src
, int32_t srcLength
,
300 UChar
* dest
, int32_t destCapacity
,
302 UParseError
* parseError
,
305 return uidna_IDNToASCII(src
, srcLength
, dest
, destCapacity
, options
, parseError
, status
);
310 * imp: common/utf_impl.c
311 * hdr: common/unicode/utf8.h
314 U_CAPI
int32_t U_EXPORT2
315 utf8_appendCharSafeBody_4_0(uint8_t *s
, int32_t i
, int32_t length
, UChar32 c
, UBool
*pIsError
)
317 return utf8_appendCharSafeBody(s
, i
, length
, c
, pIsError
);
324 * imp: common/locid.cpp
325 * hdr: common/unicode/locid.h
327 class __declspec(dllexport
) Locale
: public icu::Locale
{
330 Locale(const char* language
, const char* country
= 0, const char* variant
= 0, const char* keywordsAndValues
= 0)
331 : icu::Locale(language
, country
, variant
, keywordsAndValues
)
338 * imp: common/unistr.cpp
339 * hdr: common/unicode/unistr.h
341 class __declspec(dllexport
) UnicodeString
: public icu::UnicodeString
{
343 UnicodeString(UBool isTerminated
, const UChar
*text
, int32_t textLength
)
344 : icu::UnicodeString(isTerminated
, text
, textLength
)
348 UnicodeString(int32_t capacity
, UChar32 c
, int32_t count
)
349 : icu::UnicodeString(capacity
, c
, count
)
354 : icu::UnicodeString()
358 UChar
*getBuffer(int32_t minCapacity
)
360 return icu::UnicodeString::getBuffer(minCapacity
);
363 void releaseBuffer(int32_t newLength
=-1)
365 return icu::UnicodeString::releaseBuffer(newLength
);
371 * imp: common/brkiter.cpp
372 * hdr: common/unicode/brkiter.h
374 class __declspec(dllexport
) BreakIterator
: public icu::BreakIterator
{
377 static BreakIterator
* U_EXPORT2
378 createWordInstance(const icu_4_0::Locale
& where
, UErrorCode
& status
)
380 return static_cast<BreakIterator
*>(icu::BreakIterator::createWordInstance(where
, status
));
384 }; // end namespace icu_4_0