https://github.com/nemtsov/reverse-utf16-string
Reverse UTF16 String
https://github.com/nemtsov/reverse-utf16-string
Last synced: 3 months ago
JSON representation
Reverse UTF16 String
- Host: GitHub
- URL: https://github.com/nemtsov/reverse-utf16-string
- Owner: nemtsov
- License: mit
- Created: 2014-12-18T07:02:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-18T07:38:51.000Z (over 11 years ago)
- Last Synced: 2026-03-25T13:16:00.013Z (4 months ago)
- Language: JavaScript
- Size: 176 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Reverse UTF-16 String [](http://travis-ci.org/nemtsov/reverse-utf16-string) [](http://badge.fury.io/js/reverse-utf16-string)
Optimized UTF-16 compatible reverse-string algorithm.
It only needs to traverse 1/2 of the given string, and
takes care of UTF-16 surrogate pairs.
## Usage
```javascript
var reverse = require('reverse-utf16-string');
var reversed = reverse('ab𝌄cd'); // 'dc𝌄ba'
```
## License
[MIT](/LICENSE)