mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
b9bd35d72e
git-subtree-dir: docs git-subtree-split: fdea5430f89dfd849d39212abdf5ace0a4763e5a
884 B
884 B
title | description | godocref | date | publishdate | lastmod | categories | menu | keywords | signature | workson | hugoversion | relatedfuncs | deprecated | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strings.Repeat | Returns a string consisting of count copies of the string s. | 2018-05-31 | 2018-05-31 | 2018-05-31 |
|
|
|
|
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.Repeat
requires 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:
{{ "yo" | strings.Repeat 3 }} → "yoyoyo"