Files
opentf/website/docs/configuration/functions/strrev.html.md
Nick Fagerlund 596e529602 website: Adopt a ton of pages into the "language" layout
As of this commit, that layout doesn't exist yet, but I'm isolating the one-line
changes to their own commit to try and keep your eyes from glazing over.
2020-10-26 18:19:26 -07:00

30 lines
624 B
Markdown

---
layout: "language"
page_title: "strrev - Functions - Configuration Language"
sidebar_current: "docs-funcs-string-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`](./reverse.html) reverses a sequence.