reverseGraphemeClusters
Reverse the grapheme clusters (i.e., user-perceived characters) of a string.
Usage
var reverseGraphemeClusters = require( '@stdlib/string/base/reverse-grapheme-clusters' );
reverseGraphemeClusters( str )
Reverses the grapheme clusters (i.e., user-perceived characters) of a string.
var out = reverseGraphemeClusters( 'last man standing' );
// returns 'gnidnats nam tsal'
out = reverseGraphemeClusters( 'Hidden Treasures' );
// returns 'serusaerT neddiH'
out = reverseGraphemeClusters( 'foo bar' );
// returns 'rab oof'
Examples
var reverseGraphemeClusters = require( '@stdlib/string/base/reverse-grapheme-clusters' );
var str = reverseGraphemeClusters( 'presidential election' );
// returns 'noitcele laitnediserp'
str = reverseGraphemeClusters( 'JavaScript' );
// returns 'tpircSavaJ'
str = reverseGraphemeClusters( 'The Last of the Mohicans' );
// returns 'snacihoM eht fo tsaL ehT'
str = reverseGraphemeClusters( '๐ถ๐ฎ๐ท๐ฐ๐ธ' );
// returns '๐ธ๐ฐ๐ท๐ฎ๐ถ'