mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-21 02:37:43 -05:00
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com> Signed-off-by: Damian Stasik <920747+damianstasik@users.noreply.github.com> Signed-off-by: Roman Grinovski <roman.grinovski@gmail.com> Co-authored-by: Damian Stasik <920747+damianstasik@users.noreply.github.com> Co-authored-by: Roman Grinovski <roman.grinovski@gmail.com>
27 lines
542 B
Plaintext
27 lines
542 B
Plaintext
---
|
|
sidebar_label: strrev
|
|
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`](../../language/functions/reverse.mdx) reverses a sequence.
|