@monstermann/fn
Version:
A utility library for TypeScript.
20 lines • 420 B
TypeScript
//#region src/string/dropLast.d.ts
/**
* `dropLast(target, amount)`
*
* Removes the last `amount` characters from `target` string.
*
* ```ts
* dropLast("hello world", 6); // "hello"
* ```
*
* ```ts
* pipe("hello world", dropLast(6)); // "hello"
* ```
*/
declare const dropLast: {
(amount: number): (target: string) => string;
(target: string, amount: number): string;
};
//#endregion
export { dropLast };