github.com/lyeb/hugo@v0.47.1/docs/content/en/functions/strings.Repeat.md (about)

     1  ---
     2  title: strings.Repeat
     3  # linktitle:
     4  description: Returns a string consisting of count copies of the string s.
     5  godocref:
     6  date: 2018-05-31
     7  publishdate: 2018-05-31
     8  lastmod: 2018-05-31
     9  categories: [functions]
    10  menu:
    11    docs:
    12      parent: "functions"
    13  keywords: [strings]
    14  signature: ["strings.Repeat INPUT COUNT"]
    15  workson: []
    16  hugoversion:
    17  relatedfuncs: []
    18  deprecated: false
    19  ---
    20  
    21  `strings.Repeat` provides the Go [`strings.Repeat`](https://golang.org/pkg/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.
    22  
    23  ```
    24  {{ strings.Repeat "yo" 3 }} → "yoyoyo"
    25  ```
    26  
    27  `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:
    28  
    29  ```
    30  {{ "yo" | strings.Repeat 3 }} → "yoyoyo"
    31  ```