Get unlimited public & private packages + team-based management with npm Teams.Learn more »

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

Install

npm i multibyte-substr

DownloadsWeekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • avatar