diff options
author | Dan Gudmundsson <[email protected]> | 2018-06-05 08:37:30 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2018-06-05 08:37:30 +0200 |
commit | cc6724f7c42dd92fd1d6a02248853203aaad73b6 (patch) | |
tree | 43c43a330d2ecd22514d5bb9eb7b084ddcecb237 /lib/stdlib/src | |
parent | 484b3220c49d2576eecbce7602fcc1b34231cc16 (diff) | |
parent | fd440738a6bbfb0bc53b7a32b700d37700fd1218 (diff) | |
download | otp-cc6724f7c42dd92fd1d6a02248853203aaad73b6.tar.gz otp-cc6724f7c42dd92fd1d6a02248853203aaad73b6.tar.bz2 otp-cc6724f7c42dd92fd1d6a02248853203aaad73b6.zip |
Merge branch 'dgud/stdlib/string-case-bin-bug'
* dgud/stdlib/string-case-bin-bug:
Fix *case bugs for binaries
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/string.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/stdlib/src/string.erl b/lib/stdlib/src/string.erl index f5d271c06d..cf48b882e4 100644 --- a/lib/stdlib/src/string.erl +++ b/lib/stdlib/src/string.erl @@ -691,9 +691,9 @@ uppercase_list(CPs0, Changed) -> uppercase_bin(CP1, <<CP2/utf8, Bin/binary>>, _Changed) when $a =< CP1, CP1 =< $z, CP2 < 256 -> [CP1-32|uppercase_bin(CP2, Bin, true)]; -uppercase_bin(CP1, <<CP2/utf8, Bin/binary>>, _Changed) +uppercase_bin(CP1, <<CP2/utf8, Bin/binary>>, Changed) when CP1 < 128, CP2 < 256 -> - [CP1|uppercase_bin(CP2, Bin, false)]; + [CP1|uppercase_bin(CP2, Bin, Changed)]; uppercase_bin(CP1, Bin, Changed) -> case unicode_util:uppercase([CP1|Bin]) of [CP1|CPs] -> @@ -732,9 +732,9 @@ lowercase_list(CPs0, Changed) -> lowercase_bin(CP1, <<CP2/utf8, Bin/binary>>, _Changed) when $A =< CP1, CP1 =< $Z, CP2 < 256 -> [CP1+32|lowercase_bin(CP2, Bin, true)]; -lowercase_bin(CP1, <<CP2/utf8, Bin/binary>>, _Changed) +lowercase_bin(CP1, <<CP2/utf8, Bin/binary>>, Changed) when CP1 < 128, CP2 < 256 -> - [CP1|lowercase_bin(CP2, Bin, false)]; + [CP1|lowercase_bin(CP2, Bin, Changed)]; lowercase_bin(CP1, Bin, Changed) -> case unicode_util:lowercase([CP1|Bin]) of [CP1|CPs] -> @@ -773,9 +773,9 @@ casefold_list(CPs0, Changed) -> casefold_bin(CP1, <<CP2/utf8, Bin/binary>>, _Changed) when $A =< CP1, CP1 =< $Z, CP2 < 256 -> [CP1+32|casefold_bin(CP2, Bin, true)]; -casefold_bin(CP1, <<CP2/utf8, Bin/binary>>, _Changed) +casefold_bin(CP1, <<CP2/utf8, Bin/binary>>, Changed) when CP1 < 128, CP2 < 256 -> - [CP1|casefold_bin(CP2, Bin, false)]; + [CP1|casefold_bin(CP2, Bin, Changed)]; casefold_bin(CP1, Bin, Changed) -> case unicode_util:casefold([CP1|Bin]) of [CP1|CPs] -> |