@tempots/std
filterCharcodes() function
Same as filterCharcodes
but predicate
operates on integer char codes instead of string characters.
Signature:
filterCharcodes: (s: string, predicate: (n: number) => boolean) => string
Parameters
Parameter |
Type |
Description |
---|---|---|
s |
string |
The string to filter. |
predicate |
(n: number) => boolean |
The function to apply to each character code in the string. |
Returns: string
The filtered string.