Skip to content

trim

String.trim(target)

Removes whitespace from both ends of target string.

Example

ts
import { String } from "@monstermann/string";

String.trim("  hello world  "); // "hello world"
ts
import { String } from "@monstermann/string";

pipe("  hello world  ", String.trim()); // "hello world"