Add an unusual-conversion example to to_uppercase

Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
This commit is contained in:
Scott McMurray 2019-06-01 00:23:26 -07:00
parent 37ff5d388f
commit dfd9d0429c

View file

@ -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());