effect-io-ai

Package: effect
Module: String

String.repeat

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")

Signature

declare const repeat: (count: number) => (self: string) => string

Source

Since v2.0.0