terraform/website/docs/language/functions/strrev.mdx

27 lines
567 B
Plaintext
Raw Normal View History

---
2021-12-15 03:41:17 +01:00
page_title: strrev - Functions - Configuration Language
description: The strrev function reverses a string.
---
# `strrev` Function
`strrev` reverses the characters in a string.
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).
```hcl
strrev(string)
```
## Examples
```
> strrev("hello")
olleh
> strrev("a ☃")
☃ a
```
## Related Functions
2021-12-15 03:41:17 +01:00
* [`reverse`](/language/functions/reverse) reverses a sequence.