@monstermann/fn
Version:
A utility library for TypeScript.
22 lines • 538 B
TypeScript
//#region src/string/startsWith.d.ts
/**
* `startsWith(target, source)`
*
* Checks if `target` string starts with `source` string.
*
* ```ts
* startsWith("hello world", "hello"); // true
* startsWith("hello world", "world"); // false
* ```
*
* ```ts
* pipe("hello world", startsWith("hello")); // true
* pipe("hello world", startsWith("world")); // false
* ```
*/
declare const startsWith: {
(source: string): (target: string) => boolean;
(target: string, source: string): boolean;
};
//#endregion
export { startsWith };