github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/slicestr.md (about) 1 --- 2 title: slicestr 3 # linktitle: 4 description: Creates a slice of a half-open range, including start and end indices. 5 godocref: 6 date: 2017-02-01 7 publishdate: 2017-02-01 8 lastmod: 2017-02-01 9 categories: [functions] 10 menu: 11 docs: 12 parent: "functions" 13 keywords: [strings] 14 signature: ["slicestr STRING START [END]"] 15 workson: [] 16 hugoversion: 17 relatedfuncs: [] 18 deprecated: false 19 aliases: [] 20 --- 21 22 For example, 1 and 4 creates a slice including elements 1 through 3. 23 The `end` index can be omitted; it defaults to the string's length. 24 25 * `{{slicestr "BatMan" 3}}` → "Man" 26 * `{{slicestr "BatMan" 0 3}}` → "Bat" 27