mirror of
https://github.com/kemko/nomad.git
synced 2026-01-10 12:25:42 +03:00
* Adding check-legacy-links-format workflow * Adding test-link-rewrites workflow * chore: updates link checker workflow hash * Migrating links to new format Co-authored-by: Kendall Strautman <kendallstrautman@gmail.com>
28 lines
629 B
Plaintext
28 lines
629 B
Plaintext
---
|
|
layout: docs
|
|
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
|
|
|
|
```shell-session
|
|
> strrev("hello")
|
|
olleh
|
|
> strrev("a ☃")
|
|
☃ a
|
|
```
|
|
|
|
## Related Functions
|
|
|
|
- [`reverse`](/nomad/docs/job-specification/hcl2/functions/collection/reverse) reverses a sequence.
|