github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/job-specification/hcl2/functions/string/strrev.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: strrev - Functions - Configuration Language
     4  sidebar_title: strrev
     5  description: The strrev function reverses a string.
     6  ---
     7  
     8  # `strrev` Function
     9  
    10  `strrev` reverses the characters in a string.
    11  Note that the characters are treated as _Unicode characters_ (in technical terms, Unicode [grapheme cluster boundaries](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) are respected).
    12  
    13  ```hcl
    14  strrev(string)
    15  ```
    16  
    17  ## Examples
    18  
    19  ```shell-session
    20  > strrev("hello")
    21  olleh
    22  > strrev("a ☃")
    23  ☃ a
    24  ```
    25  
    26  ## Related Functions
    27  
    28  - [`reverse`](/docs/job-specification/hcl2/functions/collection/reverse) reverses a sequence.