string-indexes
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

String Indexes

Retrieves all indexes, in non-overlapping ranges, of a substring in a string.

Install

npm install string-indexes

Usage

import getIndexes from 'string-indexes';

// Let's retrieve all the indexes for "xx"

getIndexes ( 'xxxx__xxxx__xxxxx', 'xx' ); // => [0, 2, 6, 8, 12, 14]

License

MIT © Fabio Spampinato

Readme

Keywords

Package Sidebar

Install

npm i string-indexes

Weekly Downloads

2,216

Version

2.0.1

License

MIT

Unpacked Size

2.77 kB

Total Files

5

Last publish

Collaborators

  • fabiospampinato