Skip to content

Commit e389f6a

Browse files
authored
Rollup merge of rust-lang#40499 - ericfindlay:master, r=steveklabnik
Corrected very minor documentation detail about Unicode and Japanese Japanese half-width and full-width romaji characters do have upper and lowercase according Unicode (but other Japanese characters do not). For example, ` assert_eq!('\u{FF21}'.to_lowercase().collect::<String>(),"\u{FF41}");` r? @steveklabnik
2 parents 3ebce67 + 18a8494 commit e389f6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libstd_unicode/char.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,8 @@ impl char {
829829
/// // Sometimes the result is more than one character:
830830
/// assert_eq!('İ'.to_lowercase().to_string(), "i\u{307}");
831831
///
832-
/// // Japanese scripts do not have case, and so:
832+
/// // Characters that do not have both uppercase and lowercase
833+
/// // convert into themselves.
833834
/// assert_eq!('山'.to_lowercase().to_string(), "山");
834835
/// ```
835836
#[stable(feature = "rust1", since = "1.0.0")]
@@ -889,7 +890,8 @@ impl char {
889890
/// // Sometimes the result is more than one character:
890891
/// assert_eq!('ß'.to_uppercase().to_string(), "SS");
891892
///
892-
/// // Japanese does not have case, and so:
893+
/// // Characters that do not have both uppercase and lowercase
894+
/// // convert into themselves.
893895
/// assert_eq!('山'.to_uppercase().to_string(), "山");
894896
/// ```
895897
///

0 commit comments

Comments
 (0)