Module unicode::charExperimental
[-]
[+]
[src]
Character manipulation (char
type, Unicode Scalar Value)
This module provides the Char
and UnicodeChar
traits, as well as their
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 |
Traits
Char | Basic |
UnicodeChar | Useful functions for Unicode characters. |
Functions
canonical_combining_class | |
compose | |
decompose_canonical | Compute canonical Unicode decomposition for character |
decompose_compatible | Compute canonical or compatible Unicode decomposition for character |
escape_default | Deprecated, call the escape_default method instead. |
escape_unicode | Deprecated, call the escape_unicode method instead. |
from_digit | Converts a number to the character representing it |
from_u32 | Converts from |
is_XID_continue | Returns whether the specified |
is_XID_start | Returns whether the specified |
is_alphabetic | Returns whether the specified |
is_alphanumeric | Indicates whether a |
is_control | Indicates whether a |
is_digit | Indicates whether the |
is_digit_radix | Checks if a |
is_lowercase | Indicates whether a |
is_uppercase | Indicates whether a |
is_whitespace | Indicates whether a |
len_utf8_bytes | Returns the amount of bytes this |
to_digit | Converts a |
to_lowercase | Convert a char to its lowercase equivalent |
to_uppercase | Convert a char to its uppercase equivalent |
width | Returns this character's displayed width in columns, or |