Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/string.ts>endsWith

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function endsWith
import { endsWith } from "https://deno.land/x/fun@v2.0.0/string.ts";

Creates a Predicate over string that returns true when the string ends with the supplied searchString starting at position, if it is supplied.

Examples

Example 1

import { endsWith } from "./string.ts";

const withbye = endsWith("bye");

const result1 = withbye("Hello World"); // false
const result2 = withbye("Goodbye"); // true

Type Parameters

T extends string

Parameters

searchString: T
optional
position: number