Skip to content

reverse

ts
function String.reverse<T extends string>(target: T): Reverse<T>

Reverses the characters in target string.

Example

ts
import { String } from "@monstermann/string";

String.reverse("hello world"); // "dlrow olleh"
String.reverse("abc"); // "cba"
ts
import { String } from "@monstermann/string";

pipe("hello world", String.reverse()); // "dlrow olleh"
pipe("abc", String.reverse()); // "cba"