Skip to main content
Module

x/core_fn/string/starts_with.ts

A collection of built-in object method and property as currying function
Latest
File
// Copyright 2021-present the Core-fn authors. All rights reserved. MIT license.import { curry } from "../deps.ts";import { startsWith as _startsWith } from "../uncurry/string/starts_with.ts";
/** * Checks if a string starts with the provided substring. * * @param val - search string * @param target - target string * @returns The result of `target.startsWith(val)` * * @example * ```ts * // Basic * startsWith('hello', 'hello world') // true * startsWith('good', 'hello world') // false * ``` * * @category `String` * * @beta */const startsWith = curry(_startsWith);
export { startsWith };