Skip to content

Commit

Permalink
Add an unusual-conversion example to to_uppercase
Browse files Browse the repository at this point in the history
Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
  • Loading branch information
scottmcm committed Jun 1, 2019
1 parent 37ff5d3 commit dfd9d04
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 dfd9d04

Please sign in to comment.