Package: effect
Module: String
Returns true if the string ends with the specified search string.
Example (Checking string suffixes)
import { pipe, String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(pipe("hello world", String.endsWith("world")), true)
assert.deepStrictEqual(pipe("hello world", String.endsWith("hello")), false)
Signature
declare const endsWith: (searchString: string, position?: number) => (self: string) => boolean
Since v2.0.0