- Preparing search index...
- The search index is not available
Kombo - v3.0.0
- isSubChar(predicate: ((src: string) => boolean), offset: number, string: string): number
-
Parameters
-
predicate: ((src: string) => boolean)
-
- (src: string): boolean
-
Returns boolean
-
offset: number
-
string: string
Returns number
Again, when parsing, you want to allocate as little as possible. So this function lets you say:
The
(Char -> Bool)argument is called a predicate. ThenewOffsetvalue can be a few different things:-1means that the predicate failed-2means the predicate succeeded with a\noffset + 1oroffset + 2depending on whether the UTF16 character is one or two words wide.