# Module bitflags::__core::char [−] [src]

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`.

## Structs

DecodeUtf16 | An iterator that decodes UTF-16 encoded code points from an iterator of `u16`s.
DecodeUtf16Error | An iterator that decodes UTF-16 encoded code points from an iterator of `u16`s.
EscapeDefault | An iterator that yields the literal escape code of a `char`.
EscapeUnicode | Returns an iterator that yields the hexadecimal Unicode escape of a character, as `char`s.
ToLowercase | Returns an iterator that yields the lowercase equivalent of a `char`.
ToUppercase | Returns an iterator that yields the uppercase equivalent of a `char`.
EncodeUtf16 | [Unstable] An iterator over `u16` entries represending the UTF-16 encoding of a `char` value.
EncodeUtf8 | [Unstable] An iterator over `u8` entries represending the UTF-8 encoding of a `char` value.

## Constants

MAX | The highest valid code point a `char` can have.
REPLACEMENT_CHARACTER | `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a decoding error.
UNICODE_VERSION | [Unstable] The version of Unicode that the unicode parts of `CharExt` and `UnicodeStrPrelude` traits are based on.

## Functions

decode_utf16 | Create an iterator over the UTF-16 encoded code points in `iter`, returning unpaired surrogates as `Err`s.
from_digit | Converts a digit in the given radix to a `char`.
from_u32 | Converts a `u32` to a `char`.
from_u32_unchecked | Converts a `u32` to a `char`, ignoring validity.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)