Skip to main content
Module

x/fun/string.ts>includes

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

Creates a Predicate over string that returns true when a string includes the searchString at or beyond the optional starting position.

Examples

Example 1

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

const hasSpace = includes(" ");

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

Parameters

searchString: string
optional
position: number