Skip to content

Commit 33322c8

Browse files
committed
Fix handling of title-case characters
1 parent f587884 commit 33322c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcollections/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ impl str {
16401640
// result or extend with the lower case version if an upper case
16411641
// character is found.
16421642
for (i, ch) in self.char_indices() {
1643-
if ch.is_uppercase() {
1643+
if !ch.is_lowercase() {
16441644
if let Some(offset) = left.take() {
16451645
s.push_str(&self[offset..i]);
16461646
}
@@ -1726,7 +1726,7 @@ impl str {
17261726
// result or extend with the upper case version if a lower case
17271727
// character is found.
17281728
for (i, ch) in self.char_indices() {
1729-
if ch.is_lowercase() {
1729+
if !ch.is_uppercase() {
17301730
if let Some(offset) = left.take() {
17311731
s.push_str(&self[offset..i]);
17321732
}

0 commit comments

Comments
 (0)