klyn.code.CodeTokenizer.isEscapedAt
method
public static isEscapedAt(line as String, index as Long) as Boolean
Description

Checks whether the character at index in line is escaped by an odd number of preceding backslashes.

Parameters
ParameterDescription
lineSource line text.
indexZero-based index of the character to test.
Returns

true when escaped.

Example
import klyn.code

assert CodeTokenizer.isEscapedAt("\"a\\\"b\"", 3)
assert not CodeTokenizer.isEscapedAt("\"a\\\\\"\"", 4)