Skip to main content
Module

x/fun/mod.ts>string.includes

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 string.includes
import { string } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { includes } = string;

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