std::char - Rust (original) (raw)
Module std::char
Expand description
A character type.
The char
type represents a single character. More specifically, since ‘character’ isn’t a well-defined concept in Unicode, char
is a ‘Unicode scalar value’, which is similar to, but not the same as, a ‘Unicode code point’.
This module exists for technical reasons, the primary documentation forchar
is directly on the char primitive type itself.
This module is the home of the iterator implementations for the iterators implemented on char
, as well as some useful constants and conversion functions that convert various types to char
.
The error type returned when a conversion from u32 to char fails.
An iterator that decodes UTF-16 encoded code points from an iterator of u16
s.
An error that can be returned when decoding UTF-16 code points.
An iterator that yields the literal escape code of a char
.
An iterator that yields the literal escape code of a char
.
Returns an iterator that yields the hexadecimal Unicode escape of a character, as char
s.
An error which can be returned when parsing a char.
Returns an iterator that yields the lowercase equivalent of a char
.
Returns an iterator that yields the uppercase equivalent of a char
.
The error type returned when a checked char conversion fails.
The highest valid code point a char
can have.
U+FFFD REPLACEMENT CHARACTER
(�) is used in Unicode to represent a decoding error.
The version of Unicode that the Unicode parts ofchar
and str
methods are based on.
Creates an iterator over the UTF-16 encoded code points in iter
, returning unpaired surrogates as Err
s.
Converts a digit in the given radix to a char
.
Converts a u32
to a char
.
Converts a u32
to a char
, ignoring validity.