UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

20 lines 456 B
//#region src/string/indexOf.d.ts /** * `indexOf(target, source)` * * Returns the index of the first occurrence of `source` string in `target` string, or -1 if not found. * * ```ts * indexOf("hello world", "world"); // 6 * ``` * * ```ts * pipe("hello world", indexOf("world")); // 6 * ``` */ declare const indexOf: { (source: string): (target: string) => number; (target: string, source: string): number; }; //#endregion export { indexOf };