Update to_uppercase docs to avoid ß->SS example

This commit is contained in:
Guilherme Luiz 2026-01-09 19:33:18 -03:00
parent a3f2d5abe4
commit 9156b540aa
No known key found for this signature in database
GPG key ID: 551319A0FEC30FAC

View file

@ -1147,7 +1147,7 @@ impl char {
/// As an iterator:
///
/// ```
/// for c in 'ß'.to_uppercase() {
/// for c in ''.to_uppercase() {
/// print!("{c}");
/// }
/// println!();
@ -1156,13 +1156,13 @@ impl char {
/// Using `println!` directly:
///
/// ```
/// println!("{}", 'ß'.to_uppercase());
/// println!("{}", ''.to_uppercase());
/// ```
///
/// Both are equivalent to:
///
/// ```
/// println!("SS");
/// println!("FFI");
/// ```
///
/// Using [`to_string`](../std/string/trait.ToString.html#tymethod.to_string):
@ -1171,7 +1171,7 @@ impl char {
/// assert_eq!('c'.to_uppercase().to_string(), "C");
///
/// // Sometimes the result is more than one character:
/// assert_eq!('ß'.to_uppercase().to_string(), "SS");
/// assert_eq!('ffi'.to_uppercase().to_string(), "FFI");
///
/// // Characters that do not have both uppercase and lowercase
/// // convert into themselves.