1.5 KiB
1.5 KiB
Utilities for strings
chr
chr(i)
returns a string encoding a codepoint
chr returns a string that encodes the single Unicode code
point whose value is specified by the integer i
PARAMETERS
Name | Description | Default Value |
---|---|---|
i | position of the character | none |
RETURNS
unicode string of the position
hex
hex(number)
Format integer to hexdecimal representation
PARAMETERS
Name | Description | Default Value |
---|---|---|
number | number to format | none |
RETURNS
hexdecimal representation of the number argument
ord
ord(c)
returns the codepoint of a character
ord(c) returns the integer value of the sole Unicode code point
encoded by the string c
.
If c
does not encode exactly one Unicode code point, ord
fails.
Each invalid code within the string is treated as if it encodes the
Unicode replacement character, U+FFFD.
PARAMETERS
Name | Description | Default Value |
---|---|---|
c | character whose codepoint to be returned. | none |
RETURNS
codepoint of c
argument.