MCPcopy Create free account
hub / github.com/Effect-TS/effect / indexOf

Function indexOf

packages/effect/src/String.ts:626–627  ·  view source on GitHub ↗
(searchString: string)

Source from the content-addressed store, hash-verified

624 * @since 2.0.0
625 */
626export const indexOf = (searchString: string) => (self: string): Option.Option<number> =>
627 Option.filter(Option.some(self.indexOf(searchString)), number.isGreaterThanOrEqualTo(0))
628
629/**
630 * Returns the index of the last occurrence of a substring safely, or `None` if not found.

Callers 1

writeFunction · 0.85

Calls 2

filterMethod · 0.80
someMethod · 0.80

Tested by

no test coverage detected