Module std::charStable [-] [+] [src]

Character manipulation (char type, Unicode Scalar Value)

This module provides the CharExt trait, as well as its implementation for the primitive char type, in order to allow basic character manipulation.

A char actually represents a Unicode Scalar Value, as it can contain any Unicode code point except high-surrogate and low-surrogate code points.

As such, only values in the ranges [0x0,0xD7FF] and [0xE000,0x10FFFF] (inclusive) are allowed. A char can always be safely cast to a u32; however the converse is not always true due to the above range limits and, as such, should be performed via the from_u32 function.

Constants

MAX

The highest valid code point

UNICODE_VERSION

The version of Unicode that the unicode parts of CharExt and UnicodeStrPrelude traits are based on.

Traits

CharExt

Functionality for manipulating char.

Functions

canonical_combining_class
compose
decompose_canonical

Compute canonical Unicode decomposition for character

decompose_compatible

Compute canonical or compatible Unicode decomposition for character

from_digit

Converts a number to the character representing it.

from_u32

Converts a u32 to an Option<char>.