@stdlib/string-base-reverse-code-points
v0.2.2
Published
Reverse the Unicode code points of a string.
Downloads
22
Readme
reverseCodePoints
Reverse the Unicode code points of a string.
Installation
npm install @stdlib/string-base-reverse-code-points
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 'देछ्चुनअ'
See Also
@stdlib/string-base/reverse-grapheme-clusters
: reverse the grapheme clusters (i.e., user-perceived characters) of a string.@stdlib/string-base/reverse
: reverse the UTF-16 code units of a string.
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.