Commit ae7faa7
fixes elm#970
This does not fully solve the problem of detecting case in Unicode, as it can also vary by locale.
This does make the isUpper/Lower and toUpper/Lower functions consistent.
Make Char.isLower and Char.isUpper Unicode-aware
This allows people with non-ASCII alphabets work with `Char.isLower` and `Char.isUpper`. Uses `toUpper` and `toLower`
underneath, which use Javascript's `String.prototype.toLower/UpperCase()`.
The second condition in the functions is there to distinguish between characters that have an upper/lower-case pairing,
and those that don't (`'0' == Char.toLower '0'` but we don't want `isLower '0'` to be true).1 parent 84f3889 commit ae7faa7
1 file changed
+10
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
| 88 | + | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 103 | + | |
| 104 | + | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
| |||
0 commit comments