Module std::char

Utilities for manipulating the char type

Statics

pub static MAX: char = '\U0010ffff'

The highest valid code point

 

Traits

Char

Functions

decompose_canonical

Returns the canonical decompostion of a character

decompose_compatible

Returns the compatibility decompostion of a character

escape_default

Return a 'default' ASCII and C++11-like char-literal escape of a char.

escape_unicode

Return the hexadecimal unicode escape of a char.

from_digit

Converts a number to the character representing it.

from_u32

Convert from u32 to a character.

is_XID_continue
is_XID_start
is_alphabetic

Returns whether the specified character is considered a unicode alphabetic character

is_alphanumeric

Indicates whether a character is alphanumeric. Alphanumericness is defined in terms of the Unicode General Categories 'Nd', 'Nl', 'No' and the Derived Core Property 'Alphabetic'.

is_control

Indicates whether a character is a control character. Control characters are defined in terms of the Unicode General Category 'Cc'.

is_digit

Indicates whether the character is numeric (Nd, Nl, or No)

is_digit_radix

Checks if a character parses as a numeric digit in the given radix. Compared to is_digit(), this function only recognizes the characters 0-9, a-z and A-Z.

is_lowercase

Indicates whether a character is in lower case, defined in terms of the Unicode General Category 'Ll'

is_uppercase

Indicates whether a character is in upper case, defined in terms of the Unicode General Category 'Lu'.

is_whitespace

Indicates whether a character is whitespace. Whitespace is defined in terms of the Unicode General Categories 'Zs', 'Zl', 'Zp' additional 'Cc'-category control codes in the range [0x09, 0x0d]

len_utf8_bytes

Returns the amount of bytes this character would need if encoded in utf8

to_digit

Convert a char to the corresponding digit.