Skip to content

Commit 5d1d299

Browse files
authored
Rollup merge of rust-lang#61419 - scottmcm:casing-is-on-strings, r=cramertj
Add an unusual-conversion example to to_uppercase Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
2 parents 3a06a93 + dfd9d04 commit 5d1d299

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/liballoc/str.rs

+7
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,13 @@ impl str {
431431
///
432432
/// assert_eq!(new_year, new_year.to_uppercase());
433433
/// ```
434+
///
435+
/// One character can become multiple:
436+
/// ```
437+
/// let s = "tschüß";
438+
///
439+
/// assert_eq!("TSCHÜSS", s.to_uppercase());
440+
/// ```
434441
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
435442
pub fn to_uppercase(&self) -> String {
436443
let mut s = String::with_capacity(self.len());

0 commit comments

Comments
 (0)