power-string
v1.0.0
Published
string utils
Downloads
9
Readme
power-string
string utils
Installment
$ npm i power-string --save-dev
Usage
const PowerString = require('power-string');
const {
isChineseLetter,
getLength,
sliceString,
splitToArray
} = PowerString;
isChineseLetter('中'); // true
getLength('中'); // 2
sliceString('这是一句中文', 4); // 这是
splitToArray('这是一句中文+123456', 4); // [ '这是', '一句', '中文', '+123', '456' ]
Contributors
|xudafeng| | :---: |
This project follows the git-contributor spec, auto updated at Wed Jul 10 2019 14:20:42 GMT+0800
.
License
The MIT License (MIT)