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

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: 17 days 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 string-indexes
```

## Usage

```ts
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