github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/string/strrev.mdx (about) 1 --- 2 layout: docs 3 page_title: strrev - Functions - Configuration Language 4 description: The strrev function reverses a string. 5 --- 6 7 # `strrev` Function 8 9 `strrev` reverses the characters in a string. 10 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). 11 12 ```hcl 13 strrev(string) 14 ``` 15 16 ## Examples 17 18 ```shell-session 19 > strrev("hello") 20 olleh 21 > strrev("a ☃") 22 ☃ a 23 ``` 24 25 ## Related Functions 26 27 - [`reverse`](/docs/job-specification/hcl2/functions/collection/reverse) reverses a sequence.