doc.rust-lang.org
pub const unsafe fn from_u32_unchecked(i: u32) -> char
Converts a u32 to a char, ignoring validity. Use char::from_u32_unchecked instead.
function
core
Stable since 1.5.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn from_u32_unchecked(i: u32) -> char
Converts a u32 to a char, ignoring validity.
associated_function
core
Stable since 1.52.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_u32(i: u32) -> Option<char>
Converts a u32 to a char. Use char::from_u32 instead.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_u32(i: u32) -> Option<char>
Converts a u32 to a char.
associated_function
core
Stable since 1.52.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_digit(num: u32, radix: u32) -> Option<char>
Converts a digit in the given radix to a char. Use char::from_digit instead.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_digit(num: u32, radix: u32) -> Option<char>
Converts a digit in the given radix to a char.
associated_function
core
Stable since 1.52.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn escape_unicode(self) -> EscapeUnicode
Returns an iterator that yields the hexadecimal Unicode escape of a character as chars.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn escape_default(self) -> EscapeDefault
Returns an iterator that yields the literal escape code of a character as chars.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn escape_debug(self) -> EscapeDebug
Returns an iterator that yields the literal escape code of a character as chars.
method
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn eq_ignore_ascii_case(&self, other: &char) -> bool
Checks that two values are an ASCII case-insensitive match.
method
core
Stable since 1.23.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn encode_utf8(self, dst: &mut [u8]) -> &mut str
Encodes this character as UTF-8 into the provided byte buffer, and then returns the subslice of the buffer that contains the encoded character.
method
core
Stable since 1.15.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16]
Encodes this character as native endian UTF-16 into the provided u16 buffer, and then returns the subslice of the buffer that contains the encoded character.
method
core
Stable since 1.15.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn decode_utf16<I>(iter: I) -> DecodeUtf16<<I as >::IntoIter>
Creates an iterator over the UTF-16 encoded code points in iter, returning unpaired surrogates as Errs. Use char::decode_utf16 instead.
function
core
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn decode_utf16<I>(iter: I) -> DecodeUtf16<<I as >::IntoIter>
Creates an iterator over the native endian UTF-16 encoded code points in iter, returning unpaired surrogates as Errs.
associated_function
core
Stable since 1.52.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn unpaired_surrogate(&self) -> u16
Returns the unpaired surrogate which caused this error.
method
core
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct DecodeUtf16Error
An error that can be returned when decoding UTF-16 code points.
struct
core
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct DecodeUtf16<I>
An iterator that decodes UTF-16 encoded code points from an iterator of u16s.
struct
core
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ParseCharError
An error which can be returned when parsing a char.
struct
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct CharTryFromError
The error type returned when a conversion from prim@u32 to prim@char fails.
struct
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const UNICODE_VERSION: (u8, u8, u8)
The version of Unicode that the Unicode parts of char and str methods are based on. Use char::UNICODE_VERSION instead.
constant
core
Stable since 1.45.0
Version 1.100.0-nightly