Package: effect
Module: String
Returns true if searchString appears as a substring of self, at one or more positions that are
greater than or equal to position; otherwise, returns false.
Example (Checking for substrings)
import { pipe, String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(pipe("hello world", String.includes("world")), true)
assert.deepStrictEqual(pipe("hello world", String.includes("foo")), false)
Signature
declare const includes: (searchString: string, position?: number) => (self: string) => boolean
Since v2.0.0