summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
Diffstat (limited to 'core/string')
-rw-r--r--core/string/char_range.inc1314
-rw-r--r--core/string/char_utils.h43
-rw-r--r--core/string/translation.compat.inc46
-rw-r--r--core/string/translation.cpp15
-rw-r--r--core/string/translation.h8
-rw-r--r--core/string/ustring.cpp10
6 files changed, 1409 insertions, 27 deletions
diff --git a/core/string/char_range.inc b/core/string/char_range.inc
index 5dffe4f20d..b7d6bbdb61 100644
--- a/core/string/char_range.inc
+++ b/core/string/char_range.inc
@@ -1,5 +1,5 @@
/**************************************************************************/
-/* color_names.inc */
+/* char_range.inc */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -689,7 +689,6 @@ inline constexpr CharRange xid_start[] = {
{ 0x2ceb0, 0x2ebe0 },
{ 0x2f800, 0x2fa1d },
{ 0x30000, 0x3134a },
- { 0x0, 0x0 },
};
inline constexpr CharRange xid_continue[] = {
@@ -1450,7 +1449,1316 @@ inline constexpr CharRange xid_continue[] = {
{ 0x2f800, 0x2fa1d },
{ 0x30000, 0x3134a },
{ 0xe0100, 0xe01ef },
- { 0x0, 0x0 },
+};
+
+inline constexpr CharRange uppercase_letter[] = {
+ { 0x41, 0x5a },
+ { 0xc0, 0xd6 },
+ { 0xd8, 0xde },
+ { 0x100, 0x100 },
+ { 0x102, 0x102 },
+ { 0x104, 0x104 },
+ { 0x106, 0x106 },
+ { 0x108, 0x108 },
+ { 0x10a, 0x10a },
+ { 0x10c, 0x10c },
+ { 0x10e, 0x10e },
+ { 0x110, 0x110 },
+ { 0x112, 0x112 },
+ { 0x114, 0x114 },
+ { 0x116, 0x116 },
+ { 0x118, 0x118 },
+ { 0x11a, 0x11a },
+ { 0x11c, 0x11c },
+ { 0x11e, 0x11e },
+ { 0x120, 0x120 },
+ { 0x122, 0x122 },
+ { 0x124, 0x124 },
+ { 0x126, 0x126 },
+ { 0x128, 0x128 },
+ { 0x12a, 0x12a },
+ { 0x12c, 0x12c },
+ { 0x12e, 0x12e },
+ { 0x130, 0x130 },
+ { 0x132, 0x132 },
+ { 0x134, 0x134 },
+ { 0x136, 0x136 },
+ { 0x139, 0x139 },
+ { 0x13b, 0x13b },
+ { 0x13d, 0x13d },
+ { 0x13f, 0x13f },
+ { 0x141, 0x141 },
+ { 0x143, 0x143 },
+ { 0x145, 0x145 },
+ { 0x147, 0x147 },
+ { 0x14a, 0x14a },
+ { 0x14c, 0x14c },
+ { 0x14e, 0x14e },
+ { 0x150, 0x150 },
+ { 0x152, 0x152 },
+ { 0x154, 0x154 },
+ { 0x156, 0x156 },
+ { 0x158, 0x158 },
+ { 0x15a, 0x15a },
+ { 0x15c, 0x15c },
+ { 0x15e, 0x15e },
+ { 0x160, 0x160 },
+ { 0x162, 0x162 },
+ { 0x164, 0x164 },
+ { 0x166, 0x166 },
+ { 0x168, 0x168 },
+ { 0x16a, 0x16a },
+ { 0x16c, 0x16c },
+ { 0x16e, 0x16e },
+ { 0x170, 0x170 },
+ { 0x172, 0x172 },
+ { 0x174, 0x174 },
+ { 0x176, 0x176 },
+ { 0x178, 0x179 },
+ { 0x17b, 0x17b },
+ { 0x17d, 0x17d },
+ { 0x181, 0x182 },
+ { 0x184, 0x184 },
+ { 0x186, 0x187 },
+ { 0x189, 0x18b },
+ { 0x18e, 0x191 },
+ { 0x193, 0x194 },
+ { 0x196, 0x198 },
+ { 0x19c, 0x19d },
+ { 0x19f, 0x1a0 },
+ { 0x1a2, 0x1a2 },
+ { 0x1a4, 0x1a4 },
+ { 0x1a6, 0x1a7 },
+ { 0x1a9, 0x1a9 },
+ { 0x1ac, 0x1ac },
+ { 0x1ae, 0x1af },
+ { 0x1b1, 0x1b3 },
+ { 0x1b5, 0x1b5 },
+ { 0x1b7, 0x1b8 },
+ { 0x1bc, 0x1bc },
+ { 0x1c4, 0x1c4 },
+ { 0x1c7, 0x1c7 },
+ { 0x1ca, 0x1ca },
+ { 0x1cd, 0x1cd },
+ { 0x1cf, 0x1cf },
+ { 0x1d1, 0x1d1 },
+ { 0x1d3, 0x1d3 },
+ { 0x1d5, 0x1d5 },
+ { 0x1d7, 0x1d7 },
+ { 0x1d9, 0x1d9 },
+ { 0x1db, 0x1db },
+ { 0x1de, 0x1de },
+ { 0x1e0, 0x1e0 },
+ { 0x1e2, 0x1e2 },
+ { 0x1e4, 0x1e4 },
+ { 0x1e6, 0x1e6 },
+ { 0x1e8, 0x1e8 },
+ { 0x1ea, 0x1ea },
+ { 0x1ec, 0x1ec },
+ { 0x1ee, 0x1ee },
+ { 0x1f1, 0x1f1 },
+ { 0x1f4, 0x1f4 },
+ { 0x1f6, 0x1f8 },
+ { 0x1fa, 0x1fa },
+ { 0x1fc, 0x1fc },
+ { 0x1fe, 0x1fe },
+ { 0x200, 0x200 },
+ { 0x202, 0x202 },
+ { 0x204, 0x204 },
+ { 0x206, 0x206 },
+ { 0x208, 0x208 },
+ { 0x20a, 0x20a },
+ { 0x20c, 0x20c },
+ { 0x20e, 0x20e },
+ { 0x210, 0x210 },
+ { 0x212, 0x212 },
+ { 0x214, 0x214 },
+ { 0x216, 0x216 },
+ { 0x218, 0x218 },
+ { 0x21a, 0x21a },
+ { 0x21c, 0x21c },
+ { 0x21e, 0x21e },
+ { 0x220, 0x220 },
+ { 0x222, 0x222 },
+ { 0x224, 0x224 },
+ { 0x226, 0x226 },
+ { 0x228, 0x228 },
+ { 0x22a, 0x22a },
+ { 0x22c, 0x22c },
+ { 0x22e, 0x22e },
+ { 0x230, 0x230 },
+ { 0x232, 0x232 },
+ { 0x23a, 0x23b },
+ { 0x23d, 0x23e },
+ { 0x241, 0x241 },
+ { 0x243, 0x246 },
+ { 0x248, 0x248 },
+ { 0x24a, 0x24a },
+ { 0x24c, 0x24c },
+ { 0x24e, 0x24e },
+ { 0x370, 0x370 },
+ { 0x372, 0x372 },
+ { 0x376, 0x376 },
+ { 0x37f, 0x37f },
+ { 0x386, 0x386 },
+ { 0x388, 0x38a },
+ { 0x38c, 0x38c },
+ { 0x38e, 0x38f },
+ { 0x391, 0x3a1 },
+ { 0x3a3, 0x3ab },
+ { 0x3cf, 0x3cf },
+ { 0x3d2, 0x3d4 },
+ { 0x3d8, 0x3d8 },
+ { 0x3da, 0x3da },
+ { 0x3dc, 0x3dc },
+ { 0x3de, 0x3de },
+ { 0x3e0, 0x3e0 },
+ { 0x3e2, 0x3e2 },
+ { 0x3e4, 0x3e4 },
+ { 0x3e6, 0x3e6 },
+ { 0x3e8, 0x3e8 },
+ { 0x3ea, 0x3ea },
+ { 0x3ec, 0x3ec },
+ { 0x3ee, 0x3ee },
+ { 0x3f4, 0x3f4 },
+ { 0x3f7, 0x3f7 },
+ { 0x3f9, 0x3fa },
+ { 0x3fd, 0x42f },
+ { 0x460, 0x460 },
+ { 0x462, 0x462 },
+ { 0x464, 0x464 },
+ { 0x466, 0x466 },
+ { 0x468, 0x468 },
+ { 0x46a, 0x46a },
+ { 0x46c, 0x46c },
+ { 0x46e, 0x46e },
+ { 0x470, 0x470 },
+ { 0x472, 0x472 },
+ { 0x474, 0x474 },
+ { 0x476, 0x476 },
+ { 0x478, 0x478 },
+ { 0x47a, 0x47a },
+ { 0x47c, 0x47c },
+ { 0x47e, 0x47e },
+ { 0x480, 0x480 },
+ { 0x48a, 0x48a },
+ { 0x48c, 0x48c },
+ { 0x48e, 0x48e },
+ { 0x490, 0x490 },
+ { 0x492, 0x492 },
+ { 0x494, 0x494 },
+ { 0x496, 0x496 },
+ { 0x498, 0x498 },
+ { 0x49a, 0x49a },
+ { 0x49c, 0x49c },
+ { 0x49e, 0x49e },
+ { 0x4a0, 0x4a0 },
+ { 0x4a2, 0x4a2 },
+ { 0x4a4, 0x4a4 },
+ { 0x4a6, 0x4a6 },
+ { 0x4a8, 0x4a8 },
+ { 0x4aa, 0x4aa },
+ { 0x4ac, 0x4ac },
+ { 0x4ae, 0x4ae },
+ { 0x4b0, 0x4b0 },
+ { 0x4b2, 0x4b2 },
+ { 0x4b4, 0x4b4 },
+ { 0x4b6, 0x4b6 },
+ { 0x4b8, 0x4b8 },
+ { 0x4ba, 0x4ba },
+ { 0x4bc, 0x4bc },
+ { 0x4be, 0x4be },
+ { 0x4c0, 0x4c1 },
+ { 0x4c3, 0x4c3 },
+ { 0x4c5, 0x4c5 },
+ { 0x4c7, 0x4c7 },
+ { 0x4c9, 0x4c9 },
+ { 0x4cb, 0x4cb },
+ { 0x4cd, 0x4cd },
+ { 0x4d0, 0x4d0 },
+ { 0x4d2, 0x4d2 },
+ { 0x4d4, 0x4d4 },
+ { 0x4d6, 0x4d6 },
+ { 0x4d8, 0x4d8 },
+ { 0x4da, 0x4da },
+ { 0x4dc, 0x4dc },
+ { 0x4de, 0x4de },
+ { 0x4e0, 0x4e0 },
+ { 0x4e2, 0x4e2 },
+ { 0x4e4, 0x4e4 },
+ { 0x4e6, 0x4e6 },
+ { 0x4e8, 0x4e8 },
+ { 0x4ea, 0x4ea },
+ { 0x4ec, 0x4ec },
+ { 0x4ee, 0x4ee },
+ { 0x4f0, 0x4f0 },
+ { 0x4f2, 0x4f2 },
+ { 0x4f4, 0x4f4 },
+ { 0x4f6, 0x4f6 },
+ { 0x4f8, 0x4f8 },
+ { 0x4fa, 0x4fa },
+ { 0x4fc, 0x4fc },
+ { 0x4fe, 0x4fe },
+ { 0x500, 0x500 },
+ { 0x502, 0x502 },
+ { 0x504, 0x504 },
+ { 0x506, 0x506 },
+ { 0x508, 0x508 },
+ { 0x50a, 0x50a },
+ { 0x50c, 0x50c },
+ { 0x50e, 0x50e },
+ { 0x510, 0x510 },
+ { 0x512, 0x512 },
+ { 0x514, 0x514 },
+ { 0x516, 0x516 },
+ { 0x518, 0x518 },
+ { 0x51a, 0x51a },
+ { 0x51c, 0x51c },
+ { 0x51e, 0x51e },
+ { 0x520, 0x520 },
+ { 0x522, 0x522 },
+ { 0x524, 0x524 },
+ { 0x526, 0x526 },
+ { 0x528, 0x528 },
+ { 0x52a, 0x52a },
+ { 0x52c, 0x52c },
+ { 0x52e, 0x52e },
+ { 0x531, 0x556 },
+ { 0x10a0, 0x10c5 },
+ { 0x10c7, 0x10c7 },
+ { 0x10cd, 0x10cd },
+ { 0x13a0, 0x13f5 },
+ { 0x1c90, 0x1cba },
+ { 0x1cbd, 0x1cbf },
+ { 0x1e00, 0x1e00 },
+ { 0x1e02, 0x1e02 },
+ { 0x1e04, 0x1e04 },
+ { 0x1e06, 0x1e06 },
+ { 0x1e08, 0x1e08 },
+ { 0x1e0a, 0x1e0a },
+ { 0x1e0c, 0x1e0c },
+ { 0x1e0e, 0x1e0e },
+ { 0x1e10, 0x1e10 },
+ { 0x1e12, 0x1e12 },
+ { 0x1e14, 0x1e14 },
+ { 0x1e16, 0x1e16 },
+ { 0x1e18, 0x1e18 },
+ { 0x1e1a, 0x1e1a },
+ { 0x1e1c, 0x1e1c },
+ { 0x1e1e, 0x1e1e },
+ { 0x1e20, 0x1e20 },
+ { 0x1e22, 0x1e22 },
+ { 0x1e24, 0x1e24 },
+ { 0x1e26, 0x1e26 },
+ { 0x1e28, 0x1e28 },
+ { 0x1e2a, 0x1e2a },
+ { 0x1e2c, 0x1e2c },
+ { 0x1e2e, 0x1e2e },
+ { 0x1e30, 0x1e30 },
+ { 0x1e32, 0x1e32 },
+ { 0x1e34, 0x1e34 },
+ { 0x1e36, 0x1e36 },
+ { 0x1e38, 0x1e38 },
+ { 0x1e3a, 0x1e3a },
+ { 0x1e3c, 0x1e3c },
+ { 0x1e3e, 0x1e3e },
+ { 0x1e40, 0x1e40 },
+ { 0x1e42, 0x1e42 },
+ { 0x1e44, 0x1e44 },
+ { 0x1e46, 0x1e46 },
+ { 0x1e48, 0x1e48 },
+ { 0x1e4a, 0x1e4a },
+ { 0x1e4c, 0x1e4c },
+ { 0x1e4e, 0x1e4e },
+ { 0x1e50, 0x1e50 },
+ { 0x1e52, 0x1e52 },
+ { 0x1e54, 0x1e54 },
+ { 0x1e56, 0x1e56 },
+ { 0x1e58, 0x1e58 },
+ { 0x1e5a, 0x1e5a },
+ { 0x1e5c, 0x1e5c },
+ { 0x1e5e, 0x1e5e },
+ { 0x1e60, 0x1e60 },
+ { 0x1e62, 0x1e62 },
+ { 0x1e64, 0x1e64 },
+ { 0x1e66, 0x1e66 },
+ { 0x1e68, 0x1e68 },
+ { 0x1e6a, 0x1e6a },
+ { 0x1e6c, 0x1e6c },
+ { 0x1e6e, 0x1e6e },
+ { 0x1e70, 0x1e70 },
+ { 0x1e72, 0x1e72 },
+ { 0x1e74, 0x1e74 },
+ { 0x1e76, 0x1e76 },
+ { 0x1e78, 0x1e78 },
+ { 0x1e7a, 0x1e7a },
+ { 0x1e7c, 0x1e7c },
+ { 0x1e7e, 0x1e7e },
+ { 0x1e80, 0x1e80 },
+ { 0x1e82, 0x1e82 },
+ { 0x1e84, 0x1e84 },
+ { 0x1e86, 0x1e86 },
+ { 0x1e88, 0x1e88 },
+ { 0x1e8a, 0x1e8a },
+ { 0x1e8c, 0x1e8c },
+ { 0x1e8e, 0x1e8e },
+ { 0x1e90, 0x1e90 },
+ { 0x1e92, 0x1e92 },
+ { 0x1e94, 0x1e94 },
+ { 0x1e9e, 0x1e9e },
+ { 0x1ea0, 0x1ea0 },
+ { 0x1ea2, 0x1ea2 },
+ { 0x1ea4, 0x1ea4 },
+ { 0x1ea6, 0x1ea6 },
+ { 0x1ea8, 0x1ea8 },
+ { 0x1eaa, 0x1eaa },
+ { 0x1eac, 0x1eac },
+ { 0x1eae, 0x1eae },
+ { 0x1eb0, 0x1eb0 },
+ { 0x1eb2, 0x1eb2 },
+ { 0x1eb4, 0x1eb4 },
+ { 0x1eb6, 0x1eb6 },
+ { 0x1eb8, 0x1eb8 },
+ { 0x1eba, 0x1eba },
+ { 0x1ebc, 0x1ebc },
+ { 0x1ebe, 0x1ebe },
+ { 0x1ec0, 0x1ec0 },
+ { 0x1ec2, 0x1ec2 },
+ { 0x1ec4, 0x1ec4 },
+ { 0x1ec6, 0x1ec6 },
+ { 0x1ec8, 0x1ec8 },
+ { 0x1eca, 0x1eca },
+ { 0x1ecc, 0x1ecc },
+ { 0x1ece, 0x1ece },
+ { 0x1ed0, 0x1ed0 },
+ { 0x1ed2, 0x1ed2 },
+ { 0x1ed4, 0x1ed4 },
+ { 0x1ed6, 0x1ed6 },
+ { 0x1ed8, 0x1ed8 },
+ { 0x1eda, 0x1eda },
+ { 0x1edc, 0x1edc },
+ { 0x1ede, 0x1ede },
+ { 0x1ee0, 0x1ee0 },
+ { 0x1ee2, 0x1ee2 },
+ { 0x1ee4, 0x1ee4 },
+ { 0x1ee6, 0x1ee6 },
+ { 0x1ee8, 0x1ee8 },
+ { 0x1eea, 0x1eea },
+ { 0x1eec, 0x1eec },
+ { 0x1eee, 0x1eee },
+ { 0x1ef0, 0x1ef0 },
+ { 0x1ef2, 0x1ef2 },
+ { 0x1ef4, 0x1ef4 },
+ { 0x1ef6, 0x1ef6 },
+ { 0x1ef8, 0x1ef8 },
+ { 0x1efa, 0x1efa },
+ { 0x1efc, 0x1efc },
+ { 0x1efe, 0x1efe },
+ { 0x1f08, 0x1f0f },
+ { 0x1f18, 0x1f1d },
+ { 0x1f28, 0x1f2f },
+ { 0x1f38, 0x1f3f },
+ { 0x1f48, 0x1f4d },
+ { 0x1f59, 0x1f59 },
+ { 0x1f5b, 0x1f5b },
+ { 0x1f5d, 0x1f5d },
+ { 0x1f5f, 0x1f5f },
+ { 0x1f68, 0x1f6f },
+ { 0x1fb8, 0x1fbb },
+ { 0x1fc8, 0x1fcb },
+ { 0x1fd8, 0x1fdb },
+ { 0x1fe8, 0x1fec },
+ { 0x1ff8, 0x1ffb },
+ { 0x2102, 0x2102 },
+ { 0x2107, 0x2107 },
+ { 0x210b, 0x210d },
+ { 0x2110, 0x2112 },
+ { 0x2115, 0x2115 },
+ { 0x2119, 0x211d },
+ { 0x2124, 0x2124 },
+ { 0x2126, 0x2126 },
+ { 0x2128, 0x2128 },
+ { 0x212a, 0x212d },
+ { 0x2130, 0x2133 },
+ { 0x213e, 0x213f },
+ { 0x2145, 0x2145 },
+ { 0x2183, 0x2183 },
+ { 0x2c00, 0x2c2f },
+ { 0x2c60, 0x2c60 },
+ { 0x2c62, 0x2c64 },
+ { 0x2c67, 0x2c67 },
+ { 0x2c69, 0x2c69 },
+ { 0x2c6b, 0x2c6b },
+ { 0x2c6d, 0x2c70 },
+ { 0x2c72, 0x2c72 },
+ { 0x2c75, 0x2c75 },
+ { 0x2c7e, 0x2c80 },
+ { 0x2c82, 0x2c82 },
+ { 0x2c84, 0x2c84 },
+ { 0x2c86, 0x2c86 },
+ { 0x2c88, 0x2c88 },
+ { 0x2c8a, 0x2c8a },
+ { 0x2c8c, 0x2c8c },
+ { 0x2c8e, 0x2c8e },
+ { 0x2c90, 0x2c90 },
+ { 0x2c92, 0x2c92 },
+ { 0x2c94, 0x2c94 },
+ { 0x2c96, 0x2c96 },
+ { 0x2c98, 0x2c98 },
+ { 0x2c9a, 0x2c9a },
+ { 0x2c9c, 0x2c9c },
+ { 0x2c9e, 0x2c9e },
+ { 0x2ca0, 0x2ca0 },
+ { 0x2ca2, 0x2ca2 },
+ { 0x2ca4, 0x2ca4 },
+ { 0x2ca6, 0x2ca6 },
+ { 0x2ca8, 0x2ca8 },
+ { 0x2caa, 0x2caa },
+ { 0x2cac, 0x2cac },
+ { 0x2cae, 0x2cae },
+ { 0x2cb0, 0x2cb0 },
+ { 0x2cb2, 0x2cb2 },
+ { 0x2cb4, 0x2cb4 },
+ { 0x2cb6, 0x2cb6 },
+ { 0x2cb8, 0x2cb8 },
+ { 0x2cba, 0x2cba },
+ { 0x2cbc, 0x2cbc },
+ { 0x2cbe, 0x2cbe },
+ { 0x2cc0, 0x2cc0 },
+ { 0x2cc2, 0x2cc2 },
+ { 0x2cc4, 0x2cc4 },
+ { 0x2cc6, 0x2cc6 },
+ { 0x2cc8, 0x2cc8 },
+ { 0x2cca, 0x2cca },
+ { 0x2ccc, 0x2ccc },
+ { 0x2cce, 0x2cce },
+ { 0x2cd0, 0x2cd0 },
+ { 0x2cd2, 0x2cd2 },
+ { 0x2cd4, 0x2cd4 },
+ { 0x2cd6, 0x2cd6 },
+ { 0x2cd8, 0x2cd8 },
+ { 0x2cda, 0x2cda },
+ { 0x2cdc, 0x2cdc },
+ { 0x2cde, 0x2cde },
+ { 0x2ce0, 0x2ce0 },
+ { 0x2ce2, 0x2ce2 },
+ { 0x2ceb, 0x2ceb },
+ { 0x2ced, 0x2ced },
+ { 0x2cf2, 0x2cf2 },
+ { 0xa640, 0xa640 },
+ { 0xa642, 0xa642 },
+ { 0xa644, 0xa644 },
+ { 0xa646, 0xa646 },
+ { 0xa648, 0xa648 },
+ { 0xa64a, 0xa64a },
+ { 0xa64c, 0xa64c },
+ { 0xa64e, 0xa64e },
+ { 0xa650, 0xa650 },
+ { 0xa652, 0xa652 },
+ { 0xa654, 0xa654 },
+ { 0xa656, 0xa656 },
+ { 0xa658, 0xa658 },
+ { 0xa65a, 0xa65a },
+ { 0xa65c, 0xa65c },
+ { 0xa65e, 0xa65e },
+ { 0xa660, 0xa660 },
+ { 0xa662, 0xa662 },
+ { 0xa664, 0xa664 },
+ { 0xa666, 0xa666 },
+ { 0xa668, 0xa668 },
+ { 0xa66a, 0xa66a },
+ { 0xa66c, 0xa66c },
+ { 0xa680, 0xa680 },
+ { 0xa682, 0xa682 },
+ { 0xa684, 0xa684 },
+ { 0xa686, 0xa686 },
+ { 0xa688, 0xa688 },
+ { 0xa68a, 0xa68a },
+ { 0xa68c, 0xa68c },
+ { 0xa68e, 0xa68e },
+ { 0xa690, 0xa690 },
+ { 0xa692, 0xa692 },
+ { 0xa694, 0xa694 },
+ { 0xa696, 0xa696 },
+ { 0xa698, 0xa698 },
+ { 0xa69a, 0xa69a },
+ { 0xa722, 0xa722 },
+ { 0xa724, 0xa724 },
+ { 0xa726, 0xa726 },
+ { 0xa728, 0xa728 },
+ { 0xa72a, 0xa72a },
+ { 0xa72c, 0xa72c },
+ { 0xa72e, 0xa72e },
+ { 0xa732, 0xa732 },
+ { 0xa734, 0xa734 },
+ { 0xa736, 0xa736 },
+ { 0xa738, 0xa738 },
+ { 0xa73a, 0xa73a },
+ { 0xa73c, 0xa73c },
+ { 0xa73e, 0xa73e },
+ { 0xa740, 0xa740 },
+ { 0xa742, 0xa742 },
+ { 0xa744, 0xa744 },
+ { 0xa746, 0xa746 },
+ { 0xa748, 0xa748 },
+ { 0xa74a, 0xa74a },
+ { 0xa74c, 0xa74c },
+ { 0xa74e, 0xa74e },
+ { 0xa750, 0xa750 },
+ { 0xa752, 0xa752 },
+ { 0xa754, 0xa754 },
+ { 0xa756, 0xa756 },
+ { 0xa758, 0xa758 },
+ { 0xa75a, 0xa75a },
+ { 0xa75c, 0xa75c },
+ { 0xa75e, 0xa75e },
+ { 0xa760, 0xa760 },
+ { 0xa762, 0xa762 },
+ { 0xa764, 0xa764 },
+ { 0xa766, 0xa766 },
+ { 0xa768, 0xa768 },
+ { 0xa76a, 0xa76a },
+ { 0xa76c, 0xa76c },
+ { 0xa76e, 0xa76e },
+ { 0xa779, 0xa779 },
+ { 0xa77b, 0xa77b },
+ { 0xa77d, 0xa77e },
+ { 0xa780, 0xa780 },
+ { 0xa782, 0xa782 },
+ { 0xa784, 0xa784 },
+ { 0xa786, 0xa786 },
+ { 0xa78b, 0xa78b },
+ { 0xa78d, 0xa78d },
+ { 0xa790, 0xa790 },
+ { 0xa792, 0xa792 },
+ { 0xa796, 0xa796 },
+ { 0xa798, 0xa798 },
+ { 0xa79a, 0xa79a },
+ { 0xa79c, 0xa79c },
+ { 0xa79e, 0xa79e },
+ { 0xa7a0, 0xa7a0 },
+ { 0xa7a2, 0xa7a2 },
+ { 0xa7a4, 0xa7a4 },
+ { 0xa7a6, 0xa7a6 },
+ { 0xa7a8, 0xa7a8 },
+ { 0xa7aa, 0xa7ae },
+ { 0xa7b0, 0xa7b4 },
+ { 0xa7b6, 0xa7b6 },
+ { 0xa7b8, 0xa7b8 },
+ { 0xa7ba, 0xa7ba },
+ { 0xa7bc, 0xa7bc },
+ { 0xa7be, 0xa7be },
+ { 0xa7c0, 0xa7c0 },
+ { 0xa7c2, 0xa7c2 },
+ { 0xa7c4, 0xa7c7 },
+ { 0xa7c9, 0xa7c9 },
+ { 0xa7d0, 0xa7d0 },
+ { 0xa7d6, 0xa7d6 },
+ { 0xa7d8, 0xa7d8 },
+ { 0xa7f5, 0xa7f5 },
+ { 0xff21, 0xff3a },
+ { 0x10400, 0x10427 },
+ { 0x104b0, 0x104d3 },
+ { 0x10570, 0x1057a },
+ { 0x1057c, 0x1058a },
+ { 0x1058c, 0x10592 },
+ { 0x10594, 0x10595 },
+ { 0x10c80, 0x10cb2 },
+ { 0x118a0, 0x118bf },
+ { 0x16e40, 0x16e5f },
+ { 0x1d400, 0x1d419 },
+ { 0x1d434, 0x1d44d },
+ { 0x1d468, 0x1d481 },
+ { 0x1d49c, 0x1d49c },
+ { 0x1d49e, 0x1d49f },
+ { 0x1d4a2, 0x1d4a2 },
+ { 0x1d4a5, 0x1d4a6 },
+ { 0x1d4a9, 0x1d4ac },
+ { 0x1d4ae, 0x1d4b5 },
+ { 0x1d4d0, 0x1d4e9 },
+ { 0x1d504, 0x1d505 },
+ { 0x1d507, 0x1d50a },
+ { 0x1d50d, 0x1d514 },
+ { 0x1d516, 0x1d51c },
+ { 0x1d538, 0x1d539 },
+ { 0x1d53b, 0x1d53e },
+ { 0x1d540, 0x1d544 },
+ { 0x1d546, 0x1d546 },
+ { 0x1d54a, 0x1d550 },
+ { 0x1d56c, 0x1d585 },
+ { 0x1d5a0, 0x1d5b9 },
+ { 0x1d5d4, 0x1d5ed },
+ { 0x1d608, 0x1d621 },
+ { 0x1d63c, 0x1d655 },
+ { 0x1d670, 0x1d689 },
+ { 0x1d6a8, 0x1d6c0 },
+ { 0x1d6e2, 0x1d6fa },
+ { 0x1d71c, 0x1d734 },
+ { 0x1d756, 0x1d76e },
+ { 0x1d790, 0x1d7a8 },
+ { 0x1d7ca, 0x1d7ca },
+ { 0x1e900, 0x1e921 },
+};
+
+inline constexpr CharRange lowercase_letter[] = {
+ { 0x61, 0x7a },
+ { 0xb5, 0xb5 },
+ { 0xdf, 0xf6 },
+ { 0xf8, 0xff },
+ { 0x101, 0x101 },
+ { 0x103, 0x103 },
+ { 0x105, 0x105 },
+ { 0x107, 0x107 },
+ { 0x109, 0x109 },
+ { 0x10b, 0x10b },
+ { 0x10d, 0x10d },
+ { 0x10f, 0x10f },
+ { 0x111, 0x111 },
+ { 0x113, 0x113 },
+ { 0x115, 0x115 },
+ { 0x117, 0x117 },
+ { 0x119, 0x119 },
+ { 0x11b, 0x11b },
+ { 0x11d, 0x11d },
+ { 0x11f, 0x11f },
+ { 0x121, 0x121 },
+ { 0x123, 0x123 },
+ { 0x125, 0x125 },
+ { 0x127, 0x127 },
+ { 0x129, 0x129 },
+ { 0x12b, 0x12b },
+ { 0x12d, 0x12d },
+ { 0x12f, 0x12f },
+ { 0x131, 0x131 },
+ { 0x133, 0x133 },
+ { 0x135, 0x135 },
+ { 0x137, 0x138 },
+ { 0x13a, 0x13a },
+ { 0x13c, 0x13c },
+ { 0x13e, 0x13e },
+ { 0x140, 0x140 },
+ { 0x142, 0x142 },
+ { 0x144, 0x144 },
+ { 0x146, 0x146 },
+ { 0x148, 0x149 },
+ { 0x14b, 0x14b },
+ { 0x14d, 0x14d },
+ { 0x14f, 0x14f },
+ { 0x151, 0x151 },
+ { 0x153, 0x153 },
+ { 0x155, 0x155 },
+ { 0x157, 0x157 },
+ { 0x159, 0x159 },
+ { 0x15b, 0x15b },
+ { 0x15d, 0x15d },
+ { 0x15f, 0x15f },
+ { 0x161, 0x161 },
+ { 0x163, 0x163 },
+ { 0x165, 0x165 },
+ { 0x167, 0x167 },
+ { 0x169, 0x169 },
+ { 0x16b, 0x16b },
+ { 0x16d, 0x16d },
+ { 0x16f, 0x16f },
+ { 0x171, 0x171 },
+ { 0x173, 0x173 },
+ { 0x175, 0x175 },
+ { 0x177, 0x177 },
+ { 0x17a, 0x17a },
+ { 0x17c, 0x17c },
+ { 0x17e, 0x180 },
+ { 0x183, 0x183 },
+ { 0x185, 0x185 },
+ { 0x188, 0x188 },
+ { 0x18c, 0x18d },
+ { 0x192, 0x192 },
+ { 0x195, 0x195 },
+ { 0x199, 0x19b },
+ { 0x19e, 0x19e },
+ { 0x1a1, 0x1a1 },
+ { 0x1a3, 0x1a3 },
+ { 0x1a5, 0x1a5 },
+ { 0x1a8, 0x1a8 },
+ { 0x1aa, 0x1ab },
+ { 0x1ad, 0x1ad },
+ { 0x1b0, 0x1b0 },
+ { 0x1b4, 0x1b4 },
+ { 0x1b6, 0x1b6 },
+ { 0x1b9, 0x1ba },
+ { 0x1bd, 0x1bf },
+ { 0x1c6, 0x1c6 },
+ { 0x1c9, 0x1c9 },
+ { 0x1cc, 0x1cc },
+ { 0x1ce, 0x1ce },
+ { 0x1d0, 0x1d0 },
+ { 0x1d2, 0x1d2 },
+ { 0x1d4, 0x1d4 },
+ { 0x1d6, 0x1d6 },
+ { 0x1d8, 0x1d8 },
+ { 0x1da, 0x1da },
+ { 0x1dc, 0x1dd },
+ { 0x1df, 0x1df },
+ { 0x1e1, 0x1e1 },
+ { 0x1e3, 0x1e3 },
+ { 0x1e5, 0x1e5 },
+ { 0x1e7, 0x1e7 },
+ { 0x1e9, 0x1e9 },
+ { 0x1eb, 0x1eb },
+ { 0x1ed, 0x1ed },
+ { 0x1ef, 0x1f0 },
+ { 0x1f3, 0x1f3 },
+ { 0x1f5, 0x1f5 },
+ { 0x1f9, 0x1f9 },
+ { 0x1fb, 0x1fb },
+ { 0x1fd, 0x1fd },
+ { 0x1ff, 0x1ff },
+ { 0x201, 0x201 },
+ { 0x203, 0x203 },
+ { 0x205, 0x205 },
+ { 0x207, 0x207 },
+ { 0x209, 0x209 },
+ { 0x20b, 0x20b },
+ { 0x20d, 0x20d },
+ { 0x20f, 0x20f },
+ { 0x211, 0x211 },
+ { 0x213, 0x213 },
+ { 0x215, 0x215 },
+ { 0x217, 0x217 },
+ { 0x219, 0x219 },
+ { 0x21b, 0x21b },
+ { 0x21d, 0x21d },
+ { 0x21f, 0x21f },
+ { 0x221, 0x221 },
+ { 0x223, 0x223 },
+ { 0x225, 0x225 },
+ { 0x227, 0x227 },
+ { 0x229, 0x229 },
+ { 0x22b, 0x22b },
+ { 0x22d, 0x22d },
+ { 0x22f, 0x22f },
+ { 0x231, 0x231 },
+ { 0x233, 0x239 },
+ { 0x23c, 0x23c },
+ { 0x23f, 0x240 },
+ { 0x242, 0x242 },
+ { 0x247, 0x247 },
+ { 0x249, 0x249 },
+ { 0x24b, 0x24b },
+ { 0x24d, 0x24d },
+ { 0x24f, 0x293 },
+ { 0x295, 0x2af },
+ { 0x371, 0x371 },
+ { 0x373, 0x373 },
+ { 0x377, 0x377 },
+ { 0x37b, 0x37d },
+ { 0x390, 0x390 },
+ { 0x3ac, 0x3ce },
+ { 0x3d0, 0x3d1 },
+ { 0x3d5, 0x3d7 },
+ { 0x3d9, 0x3d9 },
+ { 0x3db, 0x3db },
+ { 0x3dd, 0x3dd },
+ { 0x3df, 0x3df },
+ { 0x3e1, 0x3e1 },
+ { 0x3e3, 0x3e3 },
+ { 0x3e5, 0x3e5 },
+ { 0x3e7, 0x3e7 },
+ { 0x3e9, 0x3e9 },
+ { 0x3eb, 0x3eb },
+ { 0x3ed, 0x3ed },
+ { 0x3ef, 0x3f3 },
+ { 0x3f5, 0x3f5 },
+ { 0x3f8, 0x3f8 },
+ { 0x3fb, 0x3fc },
+ { 0x430, 0x45f },
+ { 0x461, 0x461 },
+ { 0x463, 0x463 },
+ { 0x465, 0x465 },
+ { 0x467, 0x467 },
+ { 0x469, 0x469 },
+ { 0x46b, 0x46b },
+ { 0x46d, 0x46d },
+ { 0x46f, 0x46f },
+ { 0x471, 0x471 },
+ { 0x473, 0x473 },
+ { 0x475, 0x475 },
+ { 0x477, 0x477 },
+ { 0x479, 0x479 },
+ { 0x47b, 0x47b },
+ { 0x47d, 0x47d },
+ { 0x47f, 0x47f },
+ { 0x481, 0x481 },
+ { 0x48b, 0x48b },
+ { 0x48d, 0x48d },
+ { 0x48f, 0x48f },
+ { 0x491, 0x491 },
+ { 0x493, 0x493 },
+ { 0x495, 0x495 },
+ { 0x497, 0x497 },
+ { 0x499, 0x499 },
+ { 0x49b, 0x49b },
+ { 0x49d, 0x49d },
+ { 0x49f, 0x49f },
+ { 0x4a1, 0x4a1 },
+ { 0x4a3, 0x4a3 },
+ { 0x4a5, 0x4a5 },
+ { 0x4a7, 0x4a7 },
+ { 0x4a9, 0x4a9 },
+ { 0x4ab, 0x4ab },
+ { 0x4ad, 0x4ad },
+ { 0x4af, 0x4af },
+ { 0x4b1, 0x4b1 },
+ { 0x4b3, 0x4b3 },
+ { 0x4b5, 0x4b5 },
+ { 0x4b7, 0x4b7 },
+ { 0x4b9, 0x4b9 },
+ { 0x4bb, 0x4bb },
+ { 0x4bd, 0x4bd },
+ { 0x4bf, 0x4bf },
+ { 0x4c2, 0x4c2 },
+ { 0x4c4, 0x4c4 },
+ { 0x4c6, 0x4c6 },
+ { 0x4c8, 0x4c8 },
+ { 0x4ca, 0x4ca },
+ { 0x4cc, 0x4cc },
+ { 0x4ce, 0x4cf },
+ { 0x4d1, 0x4d1 },
+ { 0x4d3, 0x4d3 },
+ { 0x4d5, 0x4d5 },
+ { 0x4d7, 0x4d7 },
+ { 0x4d9, 0x4d9 },
+ { 0x4db, 0x4db },
+ { 0x4dd, 0x4dd },
+ { 0x4df, 0x4df },
+ { 0x4e1, 0x4e1 },
+ { 0x4e3, 0x4e3 },
+ { 0x4e5, 0x4e5 },
+ { 0x4e7, 0x4e7 },
+ { 0x4e9, 0x4e9 },
+ { 0x4eb, 0x4eb },
+ { 0x4ed, 0x4ed },
+ { 0x4ef, 0x4ef },
+ { 0x4f1, 0x4f1 },
+ { 0x4f3, 0x4f3 },
+ { 0x4f5, 0x4f5 },
+ { 0x4f7, 0x4f7 },
+ { 0x4f9, 0x4f9 },
+ { 0x4fb, 0x4fb },
+ { 0x4fd, 0x4fd },
+ { 0x4ff, 0x4ff },
+ { 0x501, 0x501 },
+ { 0x503, 0x503 },
+ { 0x505, 0x505 },
+ { 0x507, 0x507 },
+ { 0x509, 0x509 },
+ { 0x50b, 0x50b },
+ { 0x50d, 0x50d },
+ { 0x50f, 0x50f },
+ { 0x511, 0x511 },
+ { 0x513, 0x513 },
+ { 0x515, 0x515 },
+ { 0x517, 0x517 },
+ { 0x519, 0x519 },
+ { 0x51b, 0x51b },
+ { 0x51d, 0x51d },
+ { 0x51f, 0x51f },
+ { 0x521, 0x521 },
+ { 0x523, 0x523 },
+ { 0x525, 0x525 },
+ { 0x527, 0x527 },
+ { 0x529, 0x529 },
+ { 0x52b, 0x52b },
+ { 0x52d, 0x52d },
+ { 0x52f, 0x52f },
+ { 0x560, 0x588 },
+ { 0x10d0, 0x10fa },
+ { 0x10fd, 0x10ff },
+ { 0x13f8, 0x13fd },
+ { 0x1c80, 0x1c88 },
+ { 0x1d00, 0x1d2b },
+ { 0x1d6b, 0x1d77 },
+ { 0x1d79, 0x1d9a },
+ { 0x1e01, 0x1e01 },
+ { 0x1e03, 0x1e03 },
+ { 0x1e05, 0x1e05 },
+ { 0x1e07, 0x1e07 },
+ { 0x1e09, 0x1e09 },
+ { 0x1e0b, 0x1e0b },
+ { 0x1e0d, 0x1e0d },
+ { 0x1e0f, 0x1e0f },
+ { 0x1e11, 0x1e11 },
+ { 0x1e13, 0x1e13 },
+ { 0x1e15, 0x1e15 },
+ { 0x1e17, 0x1e17 },
+ { 0x1e19, 0x1e19 },
+ { 0x1e1b, 0x1e1b },
+ { 0x1e1d, 0x1e1d },
+ { 0x1e1f, 0x1e1f },
+ { 0x1e21, 0x1e21 },
+ { 0x1e23, 0x1e23 },
+ { 0x1e25, 0x1e25 },
+ { 0x1e27, 0x1e27 },
+ { 0x1e29, 0x1e29 },
+ { 0x1e2b, 0x1e2b },
+ { 0x1e2d, 0x1e2d },
+ { 0x1e2f, 0x1e2f },
+ { 0x1e31, 0x1e31 },
+ { 0x1e33, 0x1e33 },
+ { 0x1e35, 0x1e35 },
+ { 0x1e37, 0x1e37 },
+ { 0x1e39, 0x1e39 },
+ { 0x1e3b, 0x1e3b },
+ { 0x1e3d, 0x1e3d },
+ { 0x1e3f, 0x1e3f },
+ { 0x1e41, 0x1e41 },
+ { 0x1e43, 0x1e43 },
+ { 0x1e45, 0x1e45 },
+ { 0x1e47, 0x1e47 },
+ { 0x1e49, 0x1e49 },
+ { 0x1e4b, 0x1e4b },
+ { 0x1e4d, 0x1e4d },
+ { 0x1e4f, 0x1e4f },
+ { 0x1e51, 0x1e51 },
+ { 0x1e53, 0x1e53 },
+ { 0x1e55, 0x1e55 },
+ { 0x1e57, 0x1e57 },
+ { 0x1e59, 0x1e59 },
+ { 0x1e5b, 0x1e5b },
+ { 0x1e5d, 0x1e5d },
+ { 0x1e5f, 0x1e5f },
+ { 0x1e61, 0x1e61 },
+ { 0x1e63, 0x1e63 },
+ { 0x1e65, 0x1e65 },
+ { 0x1e67, 0x1e67 },
+ { 0x1e69, 0x1e69 },
+ { 0x1e6b, 0x1e6b },
+ { 0x1e6d, 0x1e6d },
+ { 0x1e6f, 0x1e6f },
+ { 0x1e71, 0x1e71 },
+ { 0x1e73, 0x1e73 },
+ { 0x1e75, 0x1e75 },
+ { 0x1e77, 0x1e77 },
+ { 0x1e79, 0x1e79 },
+ { 0x1e7b, 0x1e7b },
+ { 0x1e7d, 0x1e7d },
+ { 0x1e7f, 0x1e7f },
+ { 0x1e81, 0x1e81 },
+ { 0x1e83, 0x1e83 },
+ { 0x1e85, 0x1e85 },
+ { 0x1e87, 0x1e87 },
+ { 0x1e89, 0x1e89 },
+ { 0x1e8b, 0x1e8b },
+ { 0x1e8d, 0x1e8d },
+ { 0x1e8f, 0x1e8f },
+ { 0x1e91, 0x1e91 },
+ { 0x1e93, 0x1e93 },
+ { 0x1e95, 0x1e9d },
+ { 0x1e9f, 0x1e9f },
+ { 0x1ea1, 0x1ea1 },
+ { 0x1ea3, 0x1ea3 },
+ { 0x1ea5, 0x1ea5 },
+ { 0x1ea7, 0x1ea7 },
+ { 0x1ea9, 0x1ea9 },
+ { 0x1eab, 0x1eab },
+ { 0x1ead, 0x1ead },
+ { 0x1eaf, 0x1eaf },
+ { 0x1eb1, 0x1eb1 },
+ { 0x1eb3, 0x1eb3 },
+ { 0x1eb5, 0x1eb5 },
+ { 0x1eb7, 0x1eb7 },
+ { 0x1eb9, 0x1eb9 },
+ { 0x1ebb, 0x1ebb },
+ { 0x1ebd, 0x1ebd },
+ { 0x1ebf, 0x1ebf },
+ { 0x1ec1, 0x1ec1 },
+ { 0x1ec3, 0x1ec3 },
+ { 0x1ec5, 0x1ec5 },
+ { 0x1ec7, 0x1ec7 },
+ { 0x1ec9, 0x1ec9 },
+ { 0x1ecb, 0x1ecb },
+ { 0x1ecd, 0x1ecd },
+ { 0x1ecf, 0x1ecf },
+ { 0x1ed1, 0x1ed1 },
+ { 0x1ed3, 0x1ed3 },
+ { 0x1ed5, 0x1ed5 },
+ { 0x1ed7, 0x1ed7 },
+ { 0x1ed9, 0x1ed9 },
+ { 0x1edb, 0x1edb },
+ { 0x1edd, 0x1edd },
+ { 0x1edf, 0x1edf },
+ { 0x1ee1, 0x1ee1 },
+ { 0x1ee3, 0x1ee3 },
+ { 0x1ee5, 0x1ee5 },
+ { 0x1ee7, 0x1ee7 },
+ { 0x1ee9, 0x1ee9 },
+ { 0x1eeb, 0x1eeb },
+ { 0x1eed, 0x1eed },
+ { 0x1eef, 0x1eef },
+ { 0x1ef1, 0x1ef1 },
+ { 0x1ef3, 0x1ef3 },
+ { 0x1ef5, 0x1ef5 },
+ { 0x1ef7, 0x1ef7 },
+ { 0x1ef9, 0x1ef9 },
+ { 0x1efb, 0x1efb },
+ { 0x1efd, 0x1efd },
+ { 0x1eff, 0x1f07 },
+ { 0x1f10, 0x1f15 },
+ { 0x1f20, 0x1f27 },
+ { 0x1f30, 0x1f37 },
+ { 0x1f40, 0x1f45 },
+ { 0x1f50, 0x1f57 },
+ { 0x1f60, 0x1f67 },
+ { 0x1f70, 0x1f7d },
+ { 0x1f80, 0x1f87 },
+ { 0x1f90, 0x1f97 },
+ { 0x1fa0, 0x1fa7 },
+ { 0x1fb0, 0x1fb4 },
+ { 0x1fb6, 0x1fb7 },
+ { 0x1fbe, 0x1fbe },
+ { 0x1fc2, 0x1fc4 },
+ { 0x1fc6, 0x1fc7 },
+ { 0x1fd0, 0x1fd3 },
+ { 0x1fd6, 0x1fd7 },
+ { 0x1fe0, 0x1fe7 },
+ { 0x1ff2, 0x1ff4 },
+ { 0x1ff6, 0x1ff7 },
+ { 0x210a, 0x210a },
+ { 0x210e, 0x210f },
+ { 0x2113, 0x2113 },
+ { 0x212f, 0x212f },
+ { 0x2134, 0x2134 },
+ { 0x2139, 0x2139 },
+ { 0x213c, 0x213d },
+ { 0x2146, 0x2149 },
+ { 0x214e, 0x214e },
+ { 0x2184, 0x2184 },
+ { 0x2c30, 0x2c5f },
+ { 0x2c61, 0x2c61 },
+ { 0x2c65, 0x2c66 },
+ { 0x2c68, 0x2c68 },
+ { 0x2c6a, 0x2c6a },
+ { 0x2c6c, 0x2c6c },
+ { 0x2c71, 0x2c71 },
+ { 0x2c73, 0x2c74 },
+ { 0x2c76, 0x2c7b },
+ { 0x2c81, 0x2c81 },
+ { 0x2c83, 0x2c83 },
+ { 0x2c85, 0x2c85 },
+ { 0x2c87, 0x2c87 },
+ { 0x2c89, 0x2c89 },
+ { 0x2c8b, 0x2c8b },
+ { 0x2c8d, 0x2c8d },
+ { 0x2c8f, 0x2c8f },
+ { 0x2c91, 0x2c91 },
+ { 0x2c93, 0x2c93 },
+ { 0x2c95, 0x2c95 },
+ { 0x2c97, 0x2c97 },
+ { 0x2c99, 0x2c99 },
+ { 0x2c9b, 0x2c9b },
+ { 0x2c9d, 0x2c9d },
+ { 0x2c9f, 0x2c9f },
+ { 0x2ca1, 0x2ca1 },
+ { 0x2ca3, 0x2ca3 },
+ { 0x2ca5, 0x2ca5 },
+ { 0x2ca7, 0x2ca7 },
+ { 0x2ca9, 0x2ca9 },
+ { 0x2cab, 0x2cab },
+ { 0x2cad, 0x2cad },
+ { 0x2caf, 0x2caf },
+ { 0x2cb1, 0x2cb1 },
+ { 0x2cb3, 0x2cb3 },
+ { 0x2cb5, 0x2cb5 },
+ { 0x2cb7, 0x2cb7 },
+ { 0x2cb9, 0x2cb9 },
+ { 0x2cbb, 0x2cbb },
+ { 0x2cbd, 0x2cbd },
+ { 0x2cbf, 0x2cbf },
+ { 0x2cc1, 0x2cc1 },
+ { 0x2cc3, 0x2cc3 },
+ { 0x2cc5, 0x2cc5 },
+ { 0x2cc7, 0x2cc7 },
+ { 0x2cc9, 0x2cc9 },
+ { 0x2ccb, 0x2ccb },
+ { 0x2ccd, 0x2ccd },
+ { 0x2ccf, 0x2ccf },
+ { 0x2cd1, 0x2cd1 },
+ { 0x2cd3, 0x2cd3 },
+ { 0x2cd5, 0x2cd5 },
+ { 0x2cd7, 0x2cd7 },
+ { 0x2cd9, 0x2cd9 },
+ { 0x2cdb, 0x2cdb },
+ { 0x2cdd, 0x2cdd },
+ { 0x2cdf, 0x2cdf },
+ { 0x2ce1, 0x2ce1 },
+ { 0x2ce3, 0x2ce4 },
+ { 0x2cec, 0x2cec },
+ { 0x2cee, 0x2cee },
+ { 0x2cf3, 0x2cf3 },
+ { 0x2d00, 0x2d25 },
+ { 0x2d27, 0x2d27 },
+ { 0x2d2d, 0x2d2d },
+ { 0xa641, 0xa641 },
+ { 0xa643, 0xa643 },
+ { 0xa645, 0xa645 },
+ { 0xa647, 0xa647 },
+ { 0xa649, 0xa649 },
+ { 0xa64b, 0xa64b },
+ { 0xa64d, 0xa64d },
+ { 0xa64f, 0xa64f },
+ { 0xa651, 0xa651 },
+ { 0xa653, 0xa653 },
+ { 0xa655, 0xa655 },
+ { 0xa657, 0xa657 },
+ { 0xa659, 0xa659 },
+ { 0xa65b, 0xa65b },
+ { 0xa65d, 0xa65d },
+ { 0xa65f, 0xa65f },
+ { 0xa661, 0xa661 },
+ { 0xa663, 0xa663 },
+ { 0xa665, 0xa665 },
+ { 0xa667, 0xa667 },
+ { 0xa669, 0xa669 },
+ { 0xa66b, 0xa66b },
+ { 0xa66d, 0xa66d },
+ { 0xa681, 0xa681 },
+ { 0xa683, 0xa683 },
+ { 0xa685, 0xa685 },
+ { 0xa687, 0xa687 },
+ { 0xa689, 0xa689 },
+ { 0xa68b, 0xa68b },
+ { 0xa68d, 0xa68d },
+ { 0xa68f, 0xa68f },
+ { 0xa691, 0xa691 },
+ { 0xa693, 0xa693 },
+ { 0xa695, 0xa695 },
+ { 0xa697, 0xa697 },
+ { 0xa699, 0xa699 },
+ { 0xa69b, 0xa69b },
+ { 0xa723, 0xa723 },
+ { 0xa725, 0xa725 },
+ { 0xa727, 0xa727 },
+ { 0xa729, 0xa729 },
+ { 0xa72b, 0xa72b },
+ { 0xa72d, 0xa72d },
+ { 0xa72f, 0xa731 },
+ { 0xa733, 0xa733 },
+ { 0xa735, 0xa735 },
+ { 0xa737, 0xa737 },
+ { 0xa739, 0xa739 },
+ { 0xa73b, 0xa73b },
+ { 0xa73d, 0xa73d },
+ { 0xa73f, 0xa73f },
+ { 0xa741, 0xa741 },
+ { 0xa743, 0xa743 },
+ { 0xa745, 0xa745 },
+ { 0xa747, 0xa747 },
+ { 0xa749, 0xa749 },
+ { 0xa74b, 0xa74b },
+ { 0xa74d, 0xa74d },
+ { 0xa74f, 0xa74f },
+ { 0xa751, 0xa751 },
+ { 0xa753, 0xa753 },
+ { 0xa755, 0xa755 },
+ { 0xa757, 0xa757 },
+ { 0xa759, 0xa759 },
+ { 0xa75b, 0xa75b },
+ { 0xa75d, 0xa75d },
+ { 0xa75f, 0xa75f },
+ { 0xa761, 0xa761 },
+ { 0xa763, 0xa763 },
+ { 0xa765, 0xa765 },
+ { 0xa767, 0xa767 },
+ { 0xa769, 0xa769 },
+ { 0xa76b, 0xa76b },
+ { 0xa76d, 0xa76d },
+ { 0xa76f, 0xa76f },
+ { 0xa771, 0xa778 },
+ { 0xa77a, 0xa77a },
+ { 0xa77c, 0xa77c },
+ { 0xa77f, 0xa77f },
+ { 0xa781, 0xa781 },
+ { 0xa783, 0xa783 },
+ { 0xa785, 0xa785 },
+ { 0xa787, 0xa787 },
+ { 0xa78c, 0xa78c },
+ { 0xa78e, 0xa78e },
+ { 0xa791, 0xa791 },
+ { 0xa793, 0xa795 },
+ { 0xa797, 0xa797 },
+ { 0xa799, 0xa799 },
+ { 0xa79b, 0xa79b },
+ { 0xa79d, 0xa79d },
+ { 0xa79f, 0xa79f },
+ { 0xa7a1, 0xa7a1 },
+ { 0xa7a3, 0xa7a3 },
+ { 0xa7a5, 0xa7a5 },
+ { 0xa7a7, 0xa7a7 },
+ { 0xa7a9, 0xa7a9 },
+ { 0xa7af, 0xa7af },
+ { 0xa7b5, 0xa7b5 },
+ { 0xa7b7, 0xa7b7 },
+ { 0xa7b9, 0xa7b9 },
+ { 0xa7bb, 0xa7bb },
+ { 0xa7bd, 0xa7bd },
+ { 0xa7bf, 0xa7bf },
+ { 0xa7c1, 0xa7c1 },
+ { 0xa7c3, 0xa7c3 },
+ { 0xa7c8, 0xa7c8 },
+ { 0xa7ca, 0xa7ca },
+ { 0xa7d1, 0xa7d1 },
+ { 0xa7d3, 0xa7d3 },
+ { 0xa7d5, 0xa7d5 },
+ { 0xa7d7, 0xa7d7 },
+ { 0xa7d9, 0xa7d9 },
+ { 0xa7f6, 0xa7f6 },
+ { 0xa7fa, 0xa7fa },
+ { 0xab30, 0xab5a },
+ { 0xab60, 0xab68 },
+ { 0xab70, 0xabbf },
+ { 0xfb00, 0xfb06 },
+ { 0xfb13, 0xfb17 },
+ { 0xff41, 0xff5a },
+ { 0x10428, 0x1044f },
+ { 0x104d8, 0x104fb },
+ { 0x10597, 0x105a1 },
+ { 0x105a3, 0x105b1 },
+ { 0x105b3, 0x105b9 },
+ { 0x105bb, 0x105bc },
+ { 0x10cc0, 0x10cf2 },
+ { 0x118c0, 0x118df },
+ { 0x16e60, 0x16e7f },
+ { 0x1d41a, 0x1d433 },
+ { 0x1d44e, 0x1d454 },
+ { 0x1d456, 0x1d467 },
+ { 0x1d482, 0x1d49b },
+ { 0x1d4b6, 0x1d4b9 },
+ { 0x1d4bb, 0x1d4bb },
+ { 0x1d4bd, 0x1d4c3 },
+ { 0x1d4c5, 0x1d4cf },
+ { 0x1d4ea, 0x1d503 },
+ { 0x1d51e, 0x1d537 },
+ { 0x1d552, 0x1d56b },
+ { 0x1d586, 0x1d59f },
+ { 0x1d5ba, 0x1d5d3 },
+ { 0x1d5ee, 0x1d607 },
+ { 0x1d622, 0x1d63b },
+ { 0x1d656, 0x1d66f },
+ { 0x1d68a, 0x1d6a5 },
+ { 0x1d6c2, 0x1d6da },
+ { 0x1d6dc, 0x1d6e1 },
+ { 0x1d6fc, 0x1d714 },
+ { 0x1d716, 0x1d71b },
+ { 0x1d736, 0x1d74e },
+ { 0x1d750, 0x1d755 },
+ { 0x1d770, 0x1d788 },
+ { 0x1d78a, 0x1d78f },
+ { 0x1d7aa, 0x1d7c2 },
+ { 0x1d7c4, 0x1d7c9 },
+ { 0x1d7cb, 0x1d7cb },
+ { 0x1df00, 0x1df09 },
+ { 0x1df0b, 0x1df1e },
+ { 0x1df25, 0x1df2a },
+ { 0x1e922, 0x1e943 },
};
#endif // CHAR_RANGE_INC
diff --git a/core/string/char_utils.h b/core/string/char_utils.h
index 4ff8fb7320..aa9bc198ca 100644
--- a/core/string/char_utils.h
+++ b/core/string/char_utils.h
@@ -35,24 +35,43 @@
#include "char_range.inc"
+#define BSEARCH_CHAR_RANGE(m_array) \
+ int low = 0; \
+ int high = sizeof(m_array) / sizeof(m_array[0]) - 1; \
+ int middle; \
+ \
+ while (low <= high) { \
+ middle = (low + high) / 2; \
+ \
+ if (c < m_array[middle].start) { \
+ high = middle - 1; \
+ } else if (c > m_array[middle].end) { \
+ low = middle + 1; \
+ } else { \
+ return true; \
+ } \
+ } \
+ \
+ return false
+
static _FORCE_INLINE_ bool is_unicode_identifier_start(char32_t c) {
- for (int i = 0; xid_start[i].start != 0; i++) {
- if (c >= xid_start[i].start && c <= xid_start[i].end) {
- return true;
- }
- }
- return false;
+ BSEARCH_CHAR_RANGE(xid_start);
}
static _FORCE_INLINE_ bool is_unicode_identifier_continue(char32_t c) {
- for (int i = 0; xid_continue[i].start != 0; i++) {
- if (c >= xid_continue[i].start && c <= xid_continue[i].end) {
- return true;
- }
- }
- return false;
+ BSEARCH_CHAR_RANGE(xid_continue);
+}
+
+static _FORCE_INLINE_ bool is_unicode_upper_case(char32_t c) {
+ BSEARCH_CHAR_RANGE(uppercase_letter);
}
+static _FORCE_INLINE_ bool is_unicode_lower_case(char32_t c) {
+ BSEARCH_CHAR_RANGE(lowercase_letter);
+}
+
+#undef BSEARCH_CHAR_RANGE
+
static _FORCE_INLINE_ bool is_ascii_upper_case(char32_t c) {
return (c >= 'A' && c <= 'Z');
}
diff --git a/core/string/translation.compat.inc b/core/string/translation.compat.inc
new file mode 100644
index 0000000000..d792d4a6fc
--- /dev/null
+++ b/core/string/translation.compat.inc
@@ -0,0 +1,46 @@
+/**************************************************************************/
+/* translation.compat.inc */
+/**************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/**************************************************************************/
+/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/**************************************************************************/
+
+#ifndef DISABLE_DEPRECATED
+
+void Translation::_bind_compatibility_methods() {
+ ClassDB::bind_compatibility_method(D_METHOD("add_message", "src_message", "xlated_message", "context"), &Translation::add_message, DEFVAL(""));
+ ClassDB::bind_compatibility_method(D_METHOD("add_plural_message", "src_message", "xlated_messages", "context"), &Translation::add_plural_message, DEFVAL(""));
+ ClassDB::bind_compatibility_method(D_METHOD("get_message", "src_message", "context"), &Translation::get_message, DEFVAL(""));
+ ClassDB::bind_compatibility_method(D_METHOD("get_plural_message", "src_message", "src_plural_message", "n", "context"), &Translation::get_plural_message, DEFVAL(""));
+ ClassDB::bind_compatibility_method(D_METHOD("erase_message", "src_message", "context"), &Translation::erase_message, DEFVAL(""));
+}
+
+void TranslationServer::_bind_compatibility_methods() {
+ ClassDB::bind_compatibility_method(D_METHOD("translate", "message", "context"), &TranslationServer::translate, DEFVAL(""));
+ ClassDB::bind_compatibility_method(D_METHOD("translate_plural", "message", "plural_message", "n", "context"), &TranslationServer::translate_plural, DEFVAL(""));
+}
+
+#endif
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index 829c9bf777..db0c3f6006 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -29,6 +29,7 @@
/**************************************************************************/
#include "translation.h"
+#include "translation.compat.inc"
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
@@ -155,11 +156,11 @@ int Translation::get_message_count() const {
void Translation::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_locale", "locale"), &Translation::set_locale);
ClassDB::bind_method(D_METHOD("get_locale"), &Translation::get_locale);
- ClassDB::bind_method(D_METHOD("add_message", "src_message", "xlated_message", "context"), &Translation::add_message, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("add_plural_message", "src_message", "xlated_messages", "context"), &Translation::add_plural_message, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("get_message", "src_message", "context"), &Translation::get_message, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("get_plural_message", "src_message", "src_plural_message", "n", "context"), &Translation::get_plural_message, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("erase_message", "src_message", "context"), &Translation::erase_message, DEFVAL(""));
+ ClassDB::bind_method(D_METHOD("add_message", "src_message", "xlated_message", "context"), &Translation::add_message, DEFVAL(StringName()));
+ ClassDB::bind_method(D_METHOD("add_plural_message", "src_message", "xlated_messages", "context"), &Translation::add_plural_message, DEFVAL(StringName()));
+ ClassDB::bind_method(D_METHOD("get_message", "src_message", "context"), &Translation::get_message, DEFVAL(StringName()));
+ ClassDB::bind_method(D_METHOD("get_plural_message", "src_message", "src_plural_message", "n", "context"), &Translation::get_plural_message, DEFVAL(StringName()));
+ ClassDB::bind_method(D_METHOD("erase_message", "src_message", "context"), &Translation::erase_message, DEFVAL(StringName()));
ClassDB::bind_method(D_METHOD("get_message_list"), &Translation::_get_message_list);
ClassDB::bind_method(D_METHOD("get_translated_message_list"), &Translation::get_translated_message_list);
ClassDB::bind_method(D_METHOD("get_message_count"), &Translation::get_message_count);
@@ -1002,8 +1003,8 @@ void TranslationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_locale_name", "locale"), &TranslationServer::get_locale_name);
- ClassDB::bind_method(D_METHOD("translate", "message", "context"), &TranslationServer::translate, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("translate_plural", "message", "plural_message", "n", "context"), &TranslationServer::translate_plural, DEFVAL(""));
+ ClassDB::bind_method(D_METHOD("translate", "message", "context"), &TranslationServer::translate, DEFVAL(StringName()));
+ ClassDB::bind_method(D_METHOD("translate_plural", "message", "plural_message", "n", "context"), &TranslationServer::translate_plural, DEFVAL(StringName()));
ClassDB::bind_method(D_METHOD("add_translation", "translation"), &TranslationServer::add_translation);
ClassDB::bind_method(D_METHOD("remove_translation", "translation"), &TranslationServer::remove_translation);
diff --git a/core/string/translation.h b/core/string/translation.h
index 3f9dbcc476..4eca37f6be 100644
--- a/core/string/translation.h
+++ b/core/string/translation.h
@@ -51,6 +51,10 @@ class Translation : public Resource {
protected:
static void _bind_methods();
+#ifndef DISABLE_DEPRECATED
+ static void _bind_compatibility_methods();
+#endif
+
GDVIRTUAL2RC(StringName, _get_message, StringName, StringName);
GDVIRTUAL4RC(StringName, _get_plural_message, StringName, StringName, int, StringName);
@@ -111,6 +115,10 @@ class TranslationServer : public Object {
static void _bind_methods();
+#ifndef DISABLE_DEPRECATED
+ static void _bind_compatibility_methods();
+#endif
+
struct LocaleScriptInfo {
String name;
String script;
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 67b0fdee20..540891b3b0 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -1044,17 +1044,17 @@ String String::_camelcase_to_underscore() const {
int start_index = 0;
for (int i = 1; i < size(); i++) {
- bool is_prev_upper = is_ascii_upper_case(cstr[i - 1]);
- bool is_prev_lower = is_ascii_lower_case(cstr[i - 1]);
+ bool is_prev_upper = is_unicode_upper_case(cstr[i - 1]);
+ bool is_prev_lower = is_unicode_lower_case(cstr[i - 1]);
bool is_prev_digit = is_digit(cstr[i - 1]);
- bool is_curr_upper = is_ascii_upper_case(cstr[i]);
- bool is_curr_lower = is_ascii_lower_case(cstr[i]);
+ bool is_curr_upper = is_unicode_upper_case(cstr[i]);
+ bool is_curr_lower = is_unicode_lower_case(cstr[i]);
bool is_curr_digit = is_digit(cstr[i]);
bool is_next_lower = false;
if (i + 1 < size()) {
- is_next_lower = is_ascii_lower_case(cstr[i + 1]);
+ is_next_lower = is_unicode_lower_case(cstr[i + 1]);
}
const bool cond_a = is_prev_lower && is_curr_upper; // aA