unescapedMatch

fun unescapedMatch(string: CharSequence, position: Int, char: Char, onMatch: () -> Unit = {}): Int

Matches a character if it is not escaped.

Return

1 if the character is matched and not preceded by an escape character, 0 otherwise

Parameters

string

the string to match

position

the position of the character to match

char

the character to match

onMatch

optional action to perform if the character is matched