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 <unicode/uvernum.h> | 7 #include <unicode/uvernum.h> |
8 | 8 |
9 #if defined(USING_SYSTEM_ICU) || (U_ICU_VERSION_MAJOR_NUM <= 57) | 9 #if defined(USING_SYSTEM_ICU) || (U_ICU_VERSION_MAJOR_NUM <= 57) |
10 #include <unicode/uniset.h> | 10 #include <unicode/uniset.h> |
(...skipping 25 matching lines...) Expand all Loading... |
36 // "Convert a section of the emoji_data.txt file to an ICU trie definition." | 36 // "Convert a section of the emoji_data.txt file to an ICU trie definition." |
37 // (interactive) | 37 // (interactive) |
38 // (goto-char 0) | 38 // (goto-char 0) |
39 // (while (re-search-forward " *;.*$" nil t) | 39 // (while (re-search-forward " *;.*$" nil t) |
40 // (replace-match "" nil nil)) | 40 // (replace-match "" nil nil)) |
41 // (goto-char 0) | 41 // (goto-char 0) |
42 // (while (re-search-forward "\\.\\." nil t) | 42 // (while (re-search-forward "\\.\\." nil t) |
43 // (replace-match "-" nil nil)) | 43 // (replace-match "-" nil nil)) |
44 // (goto-char 0) | 44 // (goto-char 0) |
45 // ; Pad 4 digit characters, step 1 | 45 // ; Pad 4 digit characters, step 1 |
46 // (while (re-search-forward "\\([^0-9A-F]*\\)\\([0-9A-F]\\{4\\}\\)\\([^0-9A-F
]\\)" nil t) | 46 // (while (re-search-forward |
| 47 // "\\([^0-9A-F]*\\)\\([0-9A-F]\\{4\\}\\)\\([^0-9A-F]\\)" |
| 48 // nil t) |
47 // (replace-match "\\1\\\\U0000\\2\\3" nil nil)) | 49 // (replace-match "\\1\\\\U0000\\2\\3" nil nil)) |
48 // (goto-char 0) | 50 // (goto-char 0) |
49 // ; Fix up 5 digit characters padding, step 2 | 51 // ; Fix up 5 digit characters padding, step 2 |
50 // (while (re-search-forward "1\\\\U0000" nil t) | 52 // (while (re-search-forward "1\\\\U0000" nil t) |
51 // (replace-match "\\\\U0001" nil nil)) | 53 // (replace-match "\\\\U0001" nil nil)) |
52 // (goto-char 0) | 54 // (goto-char 0) |
53 // (while (re-search-forward "^\\(.*\\)$" nil t) | 55 // (while (re-search-forward "^\\(.*\\)$" nil t) |
54 // (replace-match "[\\1]" nil nil)) | 56 // (replace-match "[\\1]" nil nil)) |
55 // (goto-char 0) | 57 // (goto-char 0) |
56 // (replace-string "\n" " ") | 58 // (replace-string "\n" " ") |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 236 |
235 bool Character::isEmojiKeycapBase(UChar32 ch) { | 237 bool Character::isEmojiKeycapBase(UChar32 ch) { |
236 return (ch >= '0' && ch <= '9') || ch == '#' || ch == '*'; | 238 return (ch >= '0' && ch <= '9') || ch == '#' || ch == '*'; |
237 } | 239 } |
238 | 240 |
239 bool Character::isRegionalIndicator(UChar32 ch) { | 241 bool Character::isRegionalIndicator(UChar32 ch) { |
240 return (ch >= 0x1F1E6 && ch <= 0x1F1FF); | 242 return (ch >= 0x1F1E6 && ch <= 0x1F1FF); |
241 } | 243 } |
242 | 244 |
243 }; // namespace blink | 245 }; // namespace blink |
OLD | NEW |