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

Finds the first index of a substring starting from a position.

Parameters
  • value Substring to find.
  • start Start index (default: 0).
Returns

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

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