github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/trimsuffix.mdx (about)

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