Skip to content

Commit

Permalink
Update Unicode escapes;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernager committed Sep 24, 2024
1 parent f5cd2c5 commit 49b9d68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl char {
/// assert_eq!(char::from_u32(value_at_max + 1), None);
/// ```
#[stable(feature = "assoc_char_consts", since = "1.52.0")]
pub const MAX: char = '\u{10ffff}';
pub const MAX: char = '\u{10FFFF}';

/// `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a
/// decoding error.
Expand Down Expand Up @@ -847,7 +847,7 @@ impl char {
/// assert!('\n'.is_whitespace());
///
/// // a non-breaking space
/// assert!('\u{A0}'.is_whitespace());
/// assert!('\u{00A0}'.is_whitespace());
///
/// assert!(!'越'.is_whitespace());
/// ```
Expand Down Expand Up @@ -1015,7 +1015,7 @@ impl char {
/// Both are equivalent to:
///
/// ```
/// println!("i\u{307}");
/// println!("i\u{0307}");
/// ```
///
/// Using [`to_string`](../std/string/trait.ToString.html#tymethod.to_string):
Expand All @@ -1024,7 +1024,7 @@ impl char {
/// assert_eq!('C'.to_lowercase().to_string(), "c");
///
/// // Sometimes the result is more than one character:
/// assert_eq!('İ'.to_lowercase().to_string(), "i\u{307}");
/// assert_eq!('İ'.to_lowercase().to_string(), "i\u{0307}");
///
/// // Characters that do not have both uppercase and lowercase
/// // convert into themselves.
Expand Down

0 comments on commit 49b9d68

Please sign in to comment.