Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabiospampinato/string-indexes

Retrieves all indexes, in non-overlapping ranges, of a substring in a string.
https://github.com/fabiospampinato/string-indexes

all index indexes string

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# String Indexes

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

## Install

```sh
npm install --save string-indexes
```

## Usage

```ts
import getIndexes from 'string-indexes';

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

## License

MIT © Fabio Spampinato