Skip to main content
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.
Go to Latest
function endsWith
import { endsWith } from "https://deno.land/x/fun@v.2.0.0-alpha.11/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