klyn.String.lastIndexOf
method
public native lastIndexOf(value as String, start as Int = -1) as Int
Description

Finds the last index of a text fragment up to a position.

Parameters
ParameterDescription
valueText fragment to find.
startStart index from the left limit (default: end of string).
Returns

Index of last occurrence, or -1 if not found.

Example
assert "banana".lastIndexOf("na") == 4