power-string

1.0.0 • Public • Published

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)

Package Sidebar

Install

npm i power-string

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

10.5 kB

Total Files

8

Last publish

Collaborators

  • xudafeng