indexOf
ts
function String.indexOf(target: string, source: string): numberReturns the index of the first occurrence of source string in target string, or -1 if not found.
Example
ts
import { String } from "@monstermann/string";
String.indexOf("hello world", "world"); // 6ts
import { String } from "@monstermann/string";
pipe("hello world", String.indexOf("world")); // 6