Package: effect
Module: String
Removes whitespace from both ends of a string.
Example (Trimming whitespace)
import { String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(String.trim(" a "), "a")
assert.deepStrictEqual(String.trim(" hello world "), "hello world")
Signature
declare const trim: <A extends string>(self: A) => Trim<A>
Since v2.0.0