'αß'.toUpperCase() === 'ΑSS'
...
'ffi'.toUpperCase() === 'FFI'
...
1
yuikns 2019-02-15 13:50:00 +08:00
'ffi' == '\ufb03'
true 'ß' == '\u00DF' true https://stackoverflow.com/questions/9127644 > "ß" character is equivalent to "ss" (used in German, for example), and this is defined so in your Locale (the Locale you are using in your app). https://www.reddit.com/r/javascript/comments/9i455b > When using capital letters, SS has historically stood for ß. However, in some fonts, there also exists a corresponding capital letter; its usage is optional <§ 25 E3>. 这个讨论还是挺多的。 不太明白 "否则可能会溢出" 这个结论。用啥字符串就拿啥 .length 呗。要是 for each,不妨试试 map foreach 等? |
2
mytry OP 说错了不是溢出,应该是会被截断。
|