diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-04 04:48:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-04 04:48:13 +0200 |
| commit | 5d1d2992ef79579ba9a3aa59c7dd8c05d3e3a335 (patch) | |
| tree | 79e8d37e1590bbd352b43ea4e4269e63774a5e80 /src/liballoc | |
| parent | 3a06a93f5999233807afba6109c6a29f768163a4 (diff) | |
| parent | dfd9d0429cbea6133d240a37d6f4edf2a5a90a85 (diff) | |
Rollup merge of #61419 - scottmcm:casing-is-on-strings, r=cramertj
Add an unusual-conversion example to to_uppercase Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/str.rs | 7 |
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()); |
