> For the complete documentation index, see [llms.txt](https://v5docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5docs.keyfax.biz/reference/expression-reference/text-expressions/indexof.md).

# IndexOf

Returns the position of the first character of a piece of text found inside the databox value, or 0 when none of them is found.

Three arguments: a list of strings to look for, the separator splitting that list, and `1` to ignore case or `0` to respect it. The strings are tried in order, and the first one found wins.

| Expression                        | Databox value               | Result |
| --------------------------------- | --------------------------- | ------ |
| `IndexOf("LiKeS,George", ",", 1)` | `George Smiley likes chess` | `14`   |
| `IndexOf("LiKeS,George", ",", 0)` | `George Smiley likes chess` | `1`    |
| `IndexOf("NotThere", ",", 0)`     | `George Smiley likes chess` | `0`    |

The first two differ only in case sensitivity. Ignoring case, `LiKeS` matches `likes` at position 14. Respecting it, `LiKeS` does not match, so the second string `George` is tried and found at position 1.
