Skip to content

Commit

Permalink
Rollup merge of rust-lang#61419 - scottmcm:casing-is-on-strings, r=cr…
Browse files Browse the repository at this point in the history
…amertj

Add an unusual-conversion example to to_uppercase

Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
  • Loading branch information
Centril committed Jun 4, 2019
2 parents af87f0a + dfd9d04 commit 616c590
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/liballoc/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 616c590

Please sign in to comment.