1.0.0 • Published 5 years ago

power-string v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

power-string

NPM version build status Test coverage node version npm download

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)

1.0.0

5 years ago

0.1.0

5 years ago