blob: f5e1e36a2a320bd8b141178fc866b0fdf46a48d6 [file] [log] [blame]
---
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
* [`reverse`](/terraform/language/functions/reverse) reverses a sequence.