Class Char16
Value
Object
Represents a single 2-byte word of a UTF-16 encoded string.
A single-codepoint string literal whose single codepoint fits into a Char16
(that is, Unicode
codepoints 0 to 65535) may be used wherever a Char16
is expected. That is, it is legal to write:
def c:Char16 := "A"
- Source Code:
- View Source
Class Method Summary
-- multiply operator --
* (count :
,Int char :
):Char16 String - Returns a string consisting of
count
copies of the given character.
Initializer Summary
Field Summary
isWhitespace :Bit -
true
if this character is whitespace. isDigit :Bit -
true
if this character is a numeric digit. asChar8 :Char8 - This character converted to a
Char8
. asChar32 :Char32 - This character converted to a
Char32
. asInt8 :Int8 - This character's codepoint converted to an 8 bit signed number.
asInt16 :Int16 - This character's codepoint converted to a 16 bit signed number.
asInt32 :Int32 - This character's codepoint converted to a 32 bit signed number.
asInt64 :Int64 - This character's codepoint converted to a 64 bit signed number.
asInt :Int - This character's codepoint converted to an
Int
. asUInt8 :UInt8 - This character's codepoint converted to an 8 bit unsigned number.
asUInt16 :UInt16 - This character's codepoint converted to a 16 bit unsigned number.
asUInt32 :UInt32 - This character's codepoint converted to a 32 bit unsigned number.
asUInt64 :UInt64 - This character's codepoint converted to a 64 bit unsigned number.
asUInt :UInt - This character's codepoint converted to a
UInt
. toChar8 :Char8 - This character converted to a
Char8
. toChar32 :Char32 - This character converted to a
Char32
. toInt8 :Int8 - This character's codepoint converted to an 8 bit signed number.
toInt16 :Int16 - This character's codepoint converted to a 16 bit signed number.
toInt32 :Int32 - This character's codepoint converted to a 32 bit signed number.
toInt64 :Int64 - This character's codepoint converted to a 64 bit signed number.
toInt :Int - This character's codepoint converted to an
Int
. toUInt8 :UInt8 - This character's codepoint converted to an 8 bit unsigned number.
toUInt16 :UInt16 - This character's codepoint converted to a 16 bit unsigned number.
toUInt32 :UInt32 - This character's codepoint converted to a 32 bit unsigned number.
toUInt64 :UInt64 - This character's codepoint converted to a 64 bit unsigned number.
toUInt :UInt - This character's codepoint converted to a
UInt
.
Instance Method Summary
-- subtract operator --
- (other :
):Char16 UInt16 - Returns the difference between the codepoints of two
Char16
s. -- subtract operator --
- (other :
):Char16 Int - Returns the difference between the codepoints of two
Char16
s. -- equals operator --
= (other :
):Char16 Bit - Returns
true
if these objects are equal. -- not equal operator --
!= (other :
):Char16 Bit - Returns
true
if these objects are not equal. -- less than operator --
< (other :
):Char16 Bit -- greater than operator --
> (other :
):Char16 Bit -- less than or equal operator --
<= (other :
):Char16 Bit -- greater than or equal operator --
>= (other :
):Char16 Bit -- multiply operator --
* (count :
):Int String - Returns a string consisting of
count
copies of this character.
Initializers
Creates a Char16
with the specified codepoint.
- Parameters:
-
- value of typevalue UInt16
Fields
true
if this character is whitespace.
true
if this character is a numeric digit.
This character converted to a Char8
. If this number is not in the range of a Char8
, a safety
violation occurs.
This character converted to a Char32
.
This character's codepoint converted to an 8 bit signed number. If this number is not in the range of an 8 bit signed number, a safety violation occurs.
This character's codepoint converted to a 16 bit signed number. If this number is not in the range of a 16 bit signed number, a safety violation occurs.
This character's codepoint converted to a 32 bit signed number.
This character's codepoint converted to a 64 bit signed number.
This character's codepoint converted to an Int
.
This character's codepoint converted to an 8 bit unsigned number. If this number is not in the range of an 8 bit unsigned number, a safety violation occurs.
This character's codepoint converted to a 16 bit unsigned number.
This character's codepoint converted to a 32 bit unsigned number.
This character's codepoint converted to a 64 bit unsigned number.
This character's codepoint converted to a UInt
.
This character converted to a Char8
. If the character's codepoint does not fit into a Char8
,
it will silently overflow.
This character converted to a Char32
.
This character's codepoint converted to an 8 bit signed number. If the character's codepoint does not fit into an 8 bit signed number, it will silently overflow.
This character's codepoint converted to a 16 bit signed number. If the character's codepoint does not fit into a 16 bit signed number, it will silently overflow.
This character's codepoint converted to a 32 bit signed number.
This character's codepoint converted to a 64 bit signed number.
This character's codepoint converted to an Int
.
This character's codepoint converted to an 8 bit unsigned number. If the character's codepoint does not fit into an 8 bit unsigned number, it will silently overflow.
This character's codepoint converted to a 16 bit unsigned number.
This character's codepoint converted to a 32 bit unsigned number.
This character's codepoint converted to a 64 bit unsigned number.
This character's codepoint converted to a UInt
.
Class Methods
Instance Methods
Returns the difference between the codepoints of two Char16
s.
- Parameters:
-
- value of typeother Char16
Returns the difference between the codepoints of two Char16
s.
- Parameters:
-
- value of typeother Char16
Returns true
if these objects are equal.
- Parameters:
-
- value of typeother Char16
- Overrides:
- frost.core.Equatable.=
Returns true
if these objects are not equal.
- Parameters:
-
- value of typeother Char16
- Overrides:
- frost.core.Equatable.!=
- Parameters:
-
- value of typeother Char16
- Parameters:
-
- value of typeother Char16
- Parameters:
-
- value of typeother Char16
- Parameters:
-
- value of typeother Char16