Characters v0.1.0

Source
The character types char8 to char512, with their width and limit constants. The built-in char is char32 and shares its constants.

char8

extend char8

One UTF-8 code unit.

Source

Constants

Bits

pub const Bits: uint = 8;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 1;

The number of bytes in the representation.

Source

Min

pub const Min: char8 = 0u32 as char8;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char8 = 255u32 as char8;

The last code unit or Unicode scalar value.

Source

char16

extend char16

One UTF-16 code unit.

Source

Constants

Bits

pub const Bits: uint = 16;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 2;

The number of bytes in the representation.

Source

Min

pub const Min: char16 = 0u32 as char16;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char16 = 65535u32 as char16;

The last code unit or Unicode scalar value.

Source

char32

extend char32

One Unicode scalar value.

Source

Constants

Bits

pub const Bits: uint = 32;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 4;

The number of bytes in the representation.

Source

Min

pub const Min: char32 = 0u32 as char32;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char32 = 1114111u32 as char32;

The last code unit or Unicode scalar value.

Source

char64

extend char64

One Unicode scalar value, in eight bytes.

Source

Constants

Bits

pub const Bits: uint = 64;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 8;

The number of bytes in the representation.

Source

Min

pub const Min: char64 = 0u32 as char64;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char64 = 1114111u32 as char64;

The last code unit or Unicode scalar value.

Source

char128

extend char128

One Unicode scalar value, in sixteen bytes.

Source

Constants

Bits

pub const Bits: uint = 128;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 16;

The number of bytes in the representation.

Source

Min

pub const Min: char128 = 0u32 as char128;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char128 = 1114111u32 as char128;

The last code unit or Unicode scalar value.

Source

char256

extend char256

One Unicode scalar value, in thirty-two bytes.

Source

Constants

Bits

pub const Bits: uint = 256;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 32;

The number of bytes in the representation.

Source

Min

pub const Min: char256 = 0u32 as char256;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char256 = 1114111u32 as char256;

The last code unit or Unicode scalar value.

Source

char512

extend char512

One Unicode scalar value, in sixty-four bytes.

Source

Constants

Bits

pub const Bits: uint = 512;

The number of bits in the representation.

Source

Bytes

pub const Bytes: uint = 64;

The number of bytes in the representation.

Source

Min

pub const Min: char512 = 0u32 as char512;

The first code unit or Unicode scalar value.

Source

Max

pub const Max: char512 = 1114111u32 as char512;

The last code unit or Unicode scalar value.

Source