take
ts
function String.take(target: string, amount: number): stringTakes the first amount characters from target string.
Example
ts
import { String } from "@monstermann/string";
String.take("hello world", 5); // "hello"ts
import { String } from "@monstermann/string";
pipe("hello world", String.take(5)); // "hello"