For creating, loading, and saving terminal character sets.
String of characters that will be converted to a set. No separator characters.
const example: CharacterSet = new CharacterSet(' .:-=+*#%@');
Use a set that has already been converted to UTF-16.
const example: CharacterSet = new CharacterSet([32, 46, 58, 45, 61, 43, 42, 35, 37, 64]);
Characters which are not in the set will be displayed using the unknown character code. By default this is '�' or the unicode replacement character. Be advised that the replacement character doesn't always displayed with the correct spacing for a monospaced font and can lead to undesirable results. If you intend to use this functionality then you can set the value of unknown manually or using the constructor.
A set of characters stored as UTF-16 numbers.
A number representing the UTF-16 code of the character to use if not in set.
Get index in set based on character. -1 if not in set.
index or -1
Will return unknown code if index is out of bounds.
UTF-16 code at index
length of set
Like getValue just the code is converted into a string.
' ' and '█' in UTF-16 form.
Generated using TypeDoc