reverseCodePoints

Reverse the Unicode code points of a string.

Usage

var reverseCodePoints = require( '@stdlib/string/base/reverse-code-points' );

reverseCodePoints( str )

Reverses the Unicode code points of a string.

var out = reverseCodePoints( 'last man standing' );
// returns 'gnidnats nam tsal'

out = reverseCodePoints( 'Hidden Treasures' );
// returns 'serusaerT neddiH'

out = reverseCodePoints( 'foo bar' );
// returns 'rab oof'

Examples

var reverseCodePoints = require( '@stdlib/string/base/reverse-code-points' );

var str = reverseCodePoints( 'presidential election' );
// returns 'noitcele laitnediserp'

str = reverseCodePoints( 'JavaScript' );
// returns 'tpircSavaJ'

str = reverseCodePoints( 'The Last of the Mohicans' );
// returns 'snacihoM eht fo tsaL ehT'

str = reverseCodePoints( 'अनुच्छेद' );
// returns 'देछ्चुनअ'
Did you find this page helpful?