about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2019-06-01 00:23:26 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2019-06-01 00:23:26 -0700
commitdfd9d0429cbea6133d240a37d6f4edf2a5a90a85 (patch)
tree7d0fca251e24bc7c85d790848fe2492ed9deca19 /src/liballoc
parent37ff5d388f8c004ca248adb635f1cc84d347eda0 (diff)
downloadrust-dfd9d0429cbea6133d240a37d6f4edf2a5a90a85.tar.gz
rust-dfd9d0429cbea6133d240a37d6f4edf2a5a90a85.zip
Add an unusual-conversion example to to_uppercase
Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/str.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index f66ff894ae8..0c7d2b837a3 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -431,6 +431,13 @@ impl str {
     ///
     /// assert_eq!(new_year, new_year.to_uppercase());
     /// ```
+    ///
+    /// One character can become multiple:
+    /// ```
+    /// let s = "tschüß";
+    ///
+    /// assert_eq!("TSCHÜSS", s.to_uppercase());
+    /// ```
     #[stable(feature = "unicode_case_mapping", since = "1.2.0")]
     pub fn to_uppercase(&self) -> String {
         let mut s = String::with_capacity(self.len());