reverse-string

Reverse a string (with Unicode support) 'foo' → 'oof'

MIT 6 个版本
安装
npm install reverse-string
yarn add reverse-string
pnpm add reverse-string
bun add reverse-string
README

reverse-string

Reverse a string (with Unicode support). 'foo' → 'oof'

Build Status NPM version

This module was inspired by Implementation #1 of Edd Mann's post: a high-performance algorithm for string reversal.

Install

You can use this module in node or in the browser.

For use via Node.js:

npm install --save reverse-string

For use via Bower:

bower install reverse-string

Usage

var reverse = require('reverse-string');

reverse('test');
//=> 'tset'

API

reverseString(string)

Returns a reversed string.

string

Required
Type: string

The string you want to reverse. Allows unicode and latin characters.

License

MIT @ Cédric JUNG

版本列表
0.0.6 2016-07-10
0.0.5 2016-07-09
0.0.4 2014-09-02
0.0.3 2014-07-22
0.0.2 2014-07-21
0.0.1 2014-07-21