Skip to content

Commit

Permalink
Rollup merge of rust-lang#40499 - ericfindlay:master, r=steveklabnik
Browse files Browse the repository at this point in the history
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
  • Loading branch information
frewsxcv authored Mar 17, 2017
2 parents b2809f7 + 18a8494 commit 4ff9b36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libstd_unicode/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,8 @@ impl char {
/// // Sometimes the result is more than one character:
/// assert_eq!('İ'.to_lowercase().to_string(), "i\u{307}");
///
/// // Japanese scripts do not have case, and so:
/// // Characters that do not have both uppercase and lowercase
/// // convert into themselves.
/// assert_eq!('山'.to_lowercase().to_string(), "山");
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -889,7 +890,8 @@ impl char {
/// // Sometimes the result is more than one character:
/// assert_eq!('ß'.to_uppercase().to_string(), "SS");
///
/// // Japanese does not have case, and so:
/// // Characters that do not have both uppercase and lowercase
/// // convert into themselves.
/// assert_eq!('山'.to_uppercase().to_string(), "山");
/// ```
///
Expand Down

0 comments on commit 4ff9b36

Please sign in to comment.