Update to_uppercase docs to avoid ß->SS example
This commit is contained in:
parent
a3f2d5abe4
commit
9156b540aa
1 changed files with 4 additions and 4 deletions
|
|
@ -1147,7 +1147,7 @@ impl char {
|
|||
/// As an iterator:
|
||||
///
|
||||
/// ```
|
||||
/// for c in 'ß'.to_uppercase() {
|
||||
/// for c in 'ffi'.to_uppercase() {
|
||||
/// print!("{c}");
|
||||
/// }
|
||||
/// println!();
|
||||
|
|
@ -1156,13 +1156,13 @@ impl char {
|
|||
/// Using `println!` directly:
|
||||
///
|
||||
/// ```
|
||||
/// println!("{}", 'ß'.to_uppercase());
|
||||
/// println!("{}", 'ffi'.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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue