Skip to content
UniKit

String find statistics

Count a string's occurrences and report its first position and query length.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Text

Find statistics

Shows matches and the first position.

Enter text and a query to calculate statistics

Occurrences: 0 · Query length: 0 · First index: 0

What this tool does

  • Count a keyword in text.
  • Inspect overlapping string matches.
  • Find the first match position.

Example

Input

banana

Output

2 occurrences

Overlapping matches are counted by default, so ana occurs twice in banana.

Frequently asked questions

Are overlapping matches counted by default?

Yes, for example ana has two overlapping matches in banana.

How is the position measured?

It uses the JavaScript string index starting at zero.

Can the query be empty?

No, it returns invalid-query.

Keywords:关键词统计string searchoccurrence countfind statisticstext tool

Related tools