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

     1  ---
     2  page_title: trimspace - Functions - Configuration Language
     3  description: |-
     4    The trimspace function removes space characters from the start and end of
     5    a given string.
     6  ---
     7  
     8  # `trimspace` Function
     9  
    10  `trimspace` removes any space characters from the start and end of the given
    11  string.
    12  
    13  This function follows the Unicode definition of "space", which includes
    14  regular spaces, tabs, newline characters, and various other space-like
    15  characters.
    16  
    17  ## Examples
    18  
    19  ```
    20  > trimspace("  hello\n\n")
    21  hello
    22  ```
    23  
    24  ## Related Functions
    25  
    26  * [`chomp`](/language/functions/chomp) removes just line ending characters from the _end_ of
    27    a string.