Package Exports
- mb-substr
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mb-substr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mb-substr
multibyte substr
Install
$ npm install mb-substrUsage
const mbsubstr = require('mb-substr');
mbsubstr('あいうえお', 2 ,2);
//=> 'い'
mbsubstr('あいうえお', 2);
//=> 'いうえお'
mbsubstr('あいうえお', 1, 2);
//=> ''
mbsubstr('あいうえお', 1, 3);
//=> 'い'
mbsubstr('aあいうえお', 1, 2);
//=> 'あ'API
mbsubstr(input, [start, [len]])
input: string
start: number
len: number
License
MIT