github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/strings.TrimRight.md (about)

     1  ---
     2  title: strings.TrimRight
     3  description: Returns a slice of a given string with all trailing 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.TrimRight CUTSET STRING"]
    14  workson: []
    15  hugoversion:
    16  relatedfuncs: [strings.TrimRight]
    17  deprecated: false
    18  aliases: []
    19  ---
    20  
    21  Given the string `"abba"`, trailing `"a"`'s can be removed a follows:
    22  
    23      {{ strings.TrimRight "abba" "a" }} → "abb"
    24  
    25  Numbers can be handled as well:
    26  
    27      {{ strings.TrimRight 1221 "12" }} → ""
    28