Hyperlinkv0.8.0-beta.28

String

String.repeatconsteffect/String.ts:808
(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")
transforming
Source effect/String.ts:8081 lines
export const repeat = (count: number) => (self: string): string => self.repeat(count)