String Module
Provides useful functions for handling string values.
Functions and values
| Function or value |
Description
|
Full Usage:
String.fromAsciiBytes bs
Parameters:
byte[]
Returns: string
|
Decodes an ASCII byte array to a string. Bytes outside the ASCII range (0–127) are replaced with '?'.
|
Full Usage:
String.fromUtf8Bytes bs
Parameters:
byte[]
Returns: string
|
Decodes a UTF-8 byte array to a string.
|
Full Usage:
String.toAsciiBytes str
Parameters:
string
Returns: byte[]
|
Encodes a string to an ASCII byte array. Throws an exception if the string contains non-ASCII characters.
|
Full Usage:
String.toUtf8Bytes str
Parameters:
string
Returns: byte[]
|
Encodes a string to a UTF-8 byte array.
|
Full Usage:
String.wrapAngleBracket s
Parameters:
string
Returns: string
|
Wraps a string with a pair of angle brackets.
|
Full Usage:
String.wrapParen s
Parameters:
string
Returns: string
|
Wraps a string with a pair of parentheses.
|
Full Usage:
String.wrapSquareBracket s
Parameters:
string
Returns: string
|
Wraps a string with a pair of square brackets.
|
B2R2