strings.reverse

Supported in:
strings.reverse(STRING)

Description

Returns a string that is the reverse of the input string.

Param data types

STRING

Return type

STRING

Code samples

Example 1

The following example passes a short string.

strings.reverse("str") = "rts"  // The function returns 'rts'.
Example 2

The following example passes an empty string.

strings.reverse("") = ""
Example 3

The following example passes a palindrome.

strings.reverse("tacocat") = "tacocat"