github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/trimsuffix.html.md (about)

     1  ---
     2  layout: "language"
     3  page_title: "trimsuffix - Functions - Configuration Language"
     4  sidebar_current: "docs-funcs-string-trimsuffix"
     5  description: |-
     6    The trimsuffix function removes the specified suffix from the end of a
     7    given string.
     8  ---
     9  
    10  # `trimsuffix` Function
    11  
    12  `trimsuffix` removes the specified suffix from the end of the given string.
    13  
    14  ## Examples
    15  
    16  ```
    17  > trimsuffix("helloworld", "world")
    18  hello
    19  ```
    20  
    21  ## Related Functions
    22  
    23  * [`trim`](./trim.html) removes characters at the start and end of a string.
    24  * [`trimprefix`](./trimprefix.html) removes a word from the start of a string.
    25  * [`trimspace`](./trimspace.html) removes all types of whitespace from
    26    both the start and the end of a string.