OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/text/Character.h" | 5 #include "platform/text/Character.h" |
6 | 6 |
7 #include "platform/text/ICUError.h" | 7 #include "platform/text/ICUError.h" |
8 #include <unicode/uvernum.h> | 8 #include <unicode/uvernum.h> |
9 | 9 |
10 #if defined(USING_SYSTEM_ICU) || (U_ICU_VERSION_MAJOR_NUM <= 57) | 10 #if defined(USING_SYSTEM_ICU) || (U_ICU_VERSION_MAJOR_NUM <= 57) |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 !u_hasBinaryProperty(ch, UCHAR_EMOJI_PRESENTATION); | 226 !u_hasBinaryProperty(ch, UCHAR_EMOJI_PRESENTATION); |
227 } | 227 } |
228 | 228 |
229 bool Character::isEmojiEmojiDefault(UChar32 ch) { | 229 bool Character::isEmojiEmojiDefault(UChar32 ch) { |
230 return u_hasBinaryProperty(ch, UCHAR_EMOJI_PRESENTATION); | 230 return u_hasBinaryProperty(ch, UCHAR_EMOJI_PRESENTATION); |
231 } | 231 } |
232 | 232 |
233 bool Character::isEmojiModifierBase(UChar32 ch) { | 233 bool Character::isEmojiModifierBase(UChar32 ch) { |
234 return u_hasBinaryProperty(ch, UCHAR_EMOJI_MODIFIER_BASE); | 234 return u_hasBinaryProperty(ch, UCHAR_EMOJI_MODIFIER_BASE); |
235 } | 235 } |
236 #endif // defined(USING_SYSTEM_ICU) && (U_ICU_VERSION_MAJOR_NUM <= 56) | 236 #endif // defined(USING_SYSTEM_ICU) && (U_ICU_VERSION_MAJOR_NUM <= 57) |
237 | 237 |
238 bool Character::isEmojiKeycapBase(UChar32 ch) { | 238 bool Character::isEmojiKeycapBase(UChar32 ch) { |
239 return (ch >= '0' && ch <= '9') || ch == '#' || ch == '*'; | 239 return (ch >= '0' && ch <= '9') || ch == '#' || ch == '*'; |
240 } | 240 } |
241 | 241 |
242 bool Character::isRegionalIndicator(UChar32 ch) { | 242 bool Character::isRegionalIndicator(UChar32 ch) { |
243 return (ch >= 0x1F1E6 && ch <= 0x1F1FF); | 243 return (ch >= 0x1F1E6 && ch <= 0x1F1FF); |
244 } | 244 } |
245 | 245 |
246 }; // namespace blink | 246 }; // namespace blink |
OLD | NEW |