multibyte-substr

0.1.1 • Public • Published

multibyte-substr Build Status

multibyte substr

Install

$ npm install --save multibyte-substr

Usage

const multibyteSubstr = require('multibyte-substr');
 
multibyteSubstr('牛丼', 1 ,2);
//=> '丼'
 
multibyteSubstr('牛丼', 0 , 4);
//=> '牛丼'

API

multibyteSubstr(input, [start, len])

input

Type: string

start

Type: number

len

Type: number

License

MIT © akameco

Dependents (1)

Package Sidebar

Install

npm i multibyte-substr

Weekly Downloads

22

Version

0.1.1

License

MIT

Last publish

Collaborators

  • akameco