effect-io-ai

Package: effect
Module: String

String.trimEnd

Removes whitespace from the end of a string.

Example (Trimming trailing whitespace)

import { String } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(String.trimEnd(" a "), " a")
assert.deepStrictEqual(String.trimEnd("hello world  "), "hello world")

Signature

declare const trimEnd: <A extends string>(self: A) => TrimEnd<A>

Source

Since v2.0.0