about summary refs log tree commit diff
path: root/src/libstd_unicode
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-17 08:49:00 -0400
committerGitHub <noreply@github.com>2017-03-17 08:49:00 -0400
commite389f6a67ef68b1c06a8f1aeb411e5b5401f549c (patch)
treeafe171589da063f9078c3016ab857329b13dddef /src/libstd_unicode
parent3ebce67ca34a595ab9011fe683fdd38c5d9c5fff (diff)
parent18a8494485569641ba27d9adf5c9057fdc966d38 (diff)
downloadrust-e389f6a67ef68b1c06a8f1aeb411e5b5401f549c.tar.gz
rust-e389f6a67ef68b1c06a8f1aeb411e5b5401f549c.zip
Rollup merge of #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
Diffstat (limited to 'src/libstd_unicode')
-rw-r--r--src/libstd_unicode/char.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs
index 682eec490bc..b980300126e 100644
--- a/src/libstd_unicode/char.rs
+++ b/src/libstd_unicode/char.rs
@@ -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")]
@@ -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(), "山");
     /// ```
     ///