Package: effect
Module: String
Pads the string from the end with a given fill string to a specified length.
Example (Padding strings at the end)
import { pipe, String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(pipe("a", String.padEnd(5)), "a ")
assert.deepStrictEqual(pipe("a", String.padEnd(5, "_")), "a____")
Signature
declare const padEnd: (maxLength: number, fillString?: string) => (self: string) => string
Since v2.0.0