Skip to content

xudafeng/power-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

power-string

NPM version build status Test coverage node version npm download

the missing utilities of String

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


snapre

This project follows the git-contributor spec, auto updated at Mon May 23 2022 15:14:54 GMT+0000.

License

The MIT License (MIT)

Releases

No releases published

Packages

No packages published