-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Make std::char
functions and constants associated to char
.
#71854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,15 +92,15 @@ const MAX_THREE_B: u32 = 0x10000; | |
/// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value | ||
/// [Code Point]: http://www.unicode.org/glossary/#code_point | ||
#[stable(feature = "rust1", since = "1.0.0")] | ||
pub const MAX: char = '\u{10ffff}'; | ||
pub const MAX: char = char::MAX; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pub use instead There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not possible because here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rustdoc can export primitive types but not associated constants. This could be improved. |
||
|
||
/// `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a | ||
/// decoding error. | ||
/// | ||
/// It can occur, for example, when giving ill-formed UTF-8 bytes to | ||
/// [`String::from_utf8_lossy`](../../std/string/struct.String.html#method.from_utf8_lossy). | ||
#[stable(feature = "decode_utf16", since = "1.9.0")] | ||
pub const REPLACEMENT_CHARACTER: char = '\u{FFFD}'; | ||
pub const REPLACEMENT_CHARACTER: char = char::REPLACEMENT_CHARACTER; | ||
|
||
/// Returns an iterator that yields the hexadecimal Unicode escape of a | ||
/// character, as `char`s. | ||
|
Uh oh!
There was an error while loading. Please reload this page.