strings.Repeat
Returns the given string repeated the given number of times.
- Syntax
- strings.Repeat COUNT STRING
- Returns
- string
Usage
The strings.Repeat function returns STRING repeated COUNT times. If COUNT is negative, the function throws an error.
Examples
{{ strings.Repeat 3 "yo" }} → yoyoyoLast updated:
October 28, 2026
:
content: Apply style guide to strings functions (d6de31ebd)
Improve this page