OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 George Staikos <staikos@kde.org> | 2 * Copyright (C) 2006 George Staikos <staikos@kde.org> |
3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> | 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> |
4 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #ifndef WTF_UNICODE_ICU_H | 23 #ifndef WTF_UnicodeIcu_h |
24 #define WTF_UNICODE_ICU_H | 24 #define WTF_UnicodeIcu_h |
25 | 25 |
26 #include <unicode/uchar.h> | 26 #include <unicode/uchar.h> |
27 #include <unicode/ustring.h> | 27 #include <unicode/ustring.h> |
28 | 28 |
29 namespace WTF { | 29 namespace WTF { |
30 | 30 |
31 namespace Unicode { | 31 namespace Unicode { |
32 | 32 |
33 enum Direction { | 33 enum Direction { |
34 LeftToRight = U_LEFT_TO_RIGHT, | 34 LeftToRight = U_LEFT_TO_RIGHT, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 return realLength; | 153 return realLength; |
154 } | 154 } |
155 | 155 |
156 inline UChar32 toTitleCase(UChar32 c) | 156 inline UChar32 toTitleCase(UChar32 c) |
157 { | 157 { |
158 return u_totitle(c); | 158 return u_totitle(c); |
159 } | 159 } |
160 | 160 |
161 inline bool isArabicChar(UChar32 c) | 161 inline bool isArabicChar(UChar32 c) |
162 { | 162 { |
163 return ublock_getCode(c) == UBLOCK_ARABIC; | 163 return ublock_getCode(c) == UBLOCK_ARABIC; |
164 } | 164 } |
165 | 165 |
166 inline bool isAlphanumeric(UChar32 c) | 166 inline bool isAlphanumeric(UChar32 c) |
167 { | 167 { |
168 return u_isalnum(c); | 168 return u_isalnum(c); |
169 } | 169 } |
170 | 170 |
171 inline bool isSeparatorSpace(UChar32 c) | 171 inline bool isSeparatorSpace(UChar32 c) |
172 { | 172 { |
173 return u_charType(c) == U_SPACE_SEPARATOR; | 173 return u_charType(c) == U_SPACE_SEPARATOR; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 inline int umemcasecmp(const UChar* a, const UChar* b, int len) | 221 inline int umemcasecmp(const UChar* a, const UChar* b, int len) |
222 { | 222 { |
223 return u_memcasecmp(a, b, len, U_FOLD_CASE_DEFAULT); | 223 return u_memcasecmp(a, b, len, U_FOLD_CASE_DEFAULT); |
224 } | 224 } |
225 | 225 |
226 } // namespace Unicode | 226 } // namespace Unicode |
227 | 227 |
228 } // namespace WTF | 228 } // namespace WTF |
229 | 229 |
230 #endif // WTF_UNICODE_ICU_H | 230 #endif // WTF_UnicodeIcu_h |
OLD | NEW |