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