Skip to content

trimEnd

String.trimEnd(target)

Removes whitespace from the end of target string.

Example

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

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

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