retainFrom
retainFrom: (CharMatcher, string) -> stringThe characters of sequence the matcher matches, in order: Text.JAGEX_PRINTABLE_CHAR_MATCHER:retainFrom(s) keeps what the game's fonts draw (U+0020-U+007E, U+0080, U+00A0-U+00FF).
Text.JAGEX_PRINTABLE_CHAR_MATCHER| Method | Returns | Description |
|---|---|---|
retainFrom(string) | string | The characters of sequence the matcher matches, in order: Text.JAGEX_PRINTABLE_CHAR_MATCHER:retainFrom(s) keeps what the game's fonts d… |
removeFrom(string) | string | The characters of sequence the matcher does not match, in order. |
matchesCharacter(string) | boolean | Whether the matcher matches the character c, a one-character string (Luau has no char), as utf8.char(code) or a utf8.codes walk giv… |
retainFromretainFrom: (CharMatcher, string) -> stringThe characters of sequence the matcher matches, in order: Text.JAGEX_PRINTABLE_CHAR_MATCHER:retainFrom(s) keeps what the game's fonts draw (U+0020-U+007E, U+0080, U+00A0-U+00FF).
removeFromremoveFrom: (CharMatcher, string) -> stringThe characters of sequence the matcher does not match, in order.
matchesCharactermatchesCharacter: (CharMatcher, string) -> booleanWhether the matcher matches the character c, a one-character string (Luau has no char), as utf8.char(code) or a utf8.codes walk gives it, or string.sub(s, i, i) on ASCII text (past ASCII it is one byte of a character, and raises as not UTF-8). Raises for a string that is not exactly one UTF-16 unit (empty, longer, or one character above U+FFFF).