@yookue/ts-lang-utils
    Preparing search index...

    Function repeat

    • Returns the repeated string with the given text and size

      Parameters

      • Optionaltext: null | string

        the source string to inspect

      • Optionalsize: number

        the size to pad to

      Returns undefined | null | string

      the repeated string with the given text and size

      David Hsing

      repeat(undefined, 0);    // undefined
      repeat('', 3); // ''
      repeat('z', 3); // 'zzz'