Hyperlinkv0.8.0-beta.28

String

String.padEndconsteffect/String.ts:770
(maxLength: number, fillString?: string): (self: string) => 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____")
transforming
Source effect/String.ts:7702 lines
export const padEnd = (maxLength: number, fillString?: string) => (self: string): string =>
  self.padEnd(maxLength, fillString)