klyn.String.indexOf
method
public native indexOf(value as String, start as Int = 0) as Int
Description

Finds the first index of a text fragment starting from a position.

Parameters
ParameterDescription
valueText fragment to find.
startStart index (default: 0).
Returns

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

Example
assert "banane".indexOf("na") == 2