(count: number): (self: string) => stringRepeats the string the specified number of times.
Example (Repeating strings)
import { pipe, String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(pipe("a", String.repeat(5)), "aaaaa")
assert.deepStrictEqual(pipe("hello", String.repeat(3)), "hellohellohello")transforming
Source effect/String.ts:8081 lines
export const const repeat: (
count: number
) => (self: string) => string
Repeats the string the specified number of times.
Example (Repeating strings)
import { pipe, String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(pipe("a", String.repeat(5)), "aaaaa")
assert.deepStrictEqual(pipe("hello", String.repeat(3)), "hellohellohello")
repeat = (count: numbercount: number) => (self: stringself: string): string => self: stringself.String.repeat(count: number): stringReturns a String value that is made from count copies appended together. If count is 0,
the empty string is returned.
repeat(count: numbercount)