string-reverse ( str -- rts ) (original) (raw)

string-reverse ( str -- rts )
Word and grapheme breaks

Prev: >graphemes ( str -- graphemes )
Next: first-word ( str -- i )

Vocabulary
unicode

Inputs

str a string

Outputs

rts a string

Word description
Reverses a string, leaving graphemes in-tact.

Definition

USING: sequences ;

IN: unicode

: string-reverse ( str -- rts ) >graphemes reverse! concat ;