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 for char
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
.
DecodeUtf16 | An iterator that decodes UTF-16 encoded code points from an iterator of |
DecodeUtf16Error | An iterator that decodes UTF-16 encoded code points from an iterator of |
EscapeDefault | An iterator that yields the literal escape code of a |
EscapeUnicode | Returns an iterator that yields the hexadecimal Unicode escape of a character, as |
ToLowercase | Returns an iterator that yields the lowercase equivalent of a |
ToUppercase | Returns an iterator that yields the uppercase equivalent of a |
CharTryFromError | [ Experimental ] The error type returned when a conversion from u32 to char fails. |
DecodeUtf8 | [ Experimental ] An iterator over an iterator of bytes of the characters the bytes represent as UTF-8 |
EscapeDebug | [ Experimental ] An iterator that yields the literal escape code of a |
MAX | The highest valid code point a |
REPLACEMENT_CHARACTER |
|
UNICODE_VERSION | [ Experimental ] The version of Unicode that the unicode parts of |
decode_utf16 | Create an iterator over the UTF-16 encoded code points in |
from_digit | Converts a digit in the given radix to a |
from_u32 | Converts a |
from_u32_unchecked⚠ | Converts a |
decode_utf8 | [ Experimental ] Decodes an |
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/char/index.html