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