github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/strings.TrimLeft.md (about) 1 --- 2 title: strings.TrimLeft 3 description: Returns a slice of a given string with all leading characters contained in the cutset removed. 4 godocref: 5 date: 2017-02-01 6 publishdate: 2017-02-01 7 lastmod: 2017-02-01 8 categories: [functions] 9 menu: 10 docs: 11 parent: "functions" 12 keywords: [strings] 13 signature: ["strings.TrimLeft CUTSET STRING"] 14 workson: [] 15 hugoversion: 16 relatedfuncs: [strings.TrimRight] 17 deprecated: false 18 aliases: [] 19 --- 20 21 Given the string `"abba"`, leading `"a"`'s can be removed a follows: 22 23 {{ strings.TrimLeft "abba" "a" }} → "bba" 24 25 Numbers can be handled as well: 26 27 {{ strings.TrimLeft 1221 "12" }} → "" 28