Returns a string consisting of count copies of the string s.
2018-05-31
2018-05-31
2018-05-31
functions
docs
parent
functions
strings
strings.Repeat INPUT COUNT
false
strings.Repeat provides the Go strings.Repeat function for Hugo templates. It takes a string and a count, and returns a string with consisting of count copies of the string argument.
{{ strings.Repeat "yo" 3 }} → "yoyoyo"
strings.Repeatrequires the second argument, which tells the function how many times to repeat the first argument; there is no default. However, it can be used as a pipeline: