Skip to content

Commit d6bc053

Browse files
committed
Further uppercase change fixes
1 parent 4b85eab commit d6bc053

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/casefold.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ Licensed under MIT License, see LICENSE.md
66
=#
77

88
_wide_lower_l(c) = ifelse(c > (V6_COMPAT ? 0xdf : 0xde), c != 0xf7, c == 0xb5)
9+
910
@inline _wide_lower_ch(ch) =
1011
ch <= 0x7f ? _islower_a(ch) : (ch > 0xff ? _islower_u(ch) : _wide_lower_l(ch))
1112

1213
@inline _isupper_ch(ch) =
13-
ch <= 0x7f ? _isupper_a(ch) : (ch <= 0xff ? _isupper_l(ch) : _isupper_u(ch))
14+
ch <= 0x7f ? _isupper_a(ch) : (ch > 0xff ? _isupper_u(ch) : _isupper_l(ch))
1415

15-
_wide_lower_latin(ch) = (ch == 0xb5) | (ch == 0xff) | (!V6_COMPAT & (ch == 0xdf))
16+
_wide_lower_latin(ch) = (ch == 0xb5) | (ch == 0xff) | (!V6_COMPAT && (ch == 0xdf))
1617

1718
_wide_out_upper(ch) =
18-
ifelse(ch == 0xb5, 0x39c, ifelse(ch == 0xff, 0x178, ifelse(ch == 0xdf, 0x1e9e, ch%UInt16)))
19+
ifelse(ch == 0xb5, 0x39c,
20+
ifelse(ch == 0xff, 0x178, ifelse(!V6_COMPAT && ch == 0xdf, 0x1e9e, ch%UInt16)))
1921

2022

2123
function uppercase_first(str::MaybeSub{S}) where {C<:ASCIICSE,S<:Str{C}}

0 commit comments

Comments
 (0)