28 lines
618 B
Plaintext
Raw Permalink Normal View History

---
2020-03-18 18:46:47 -04:00
page_title: strrev - Functions - Configuration Language
sidebar_title: strrev
2020-03-18 18:46:47 -04:00
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
```shell-session
> strrev("hello")
olleh
> strrev("a ☃")
☃ a
```
## Related Functions
2020-04-01 15:15:54 -04:00
- [`reverse`](/docs/from-1.5/functions/collection/reverse) reverses a sequence.