Skip to content

take

String.take(target, amount)

Takes 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"