> 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/substr.md).

# SubStr

Returns part of the databox value. The first argument is the position to start at, counting from 1; the second is how many characters to take.

| Expression      | Databox value | Result  |
| --------------- | ------------- | ------- |
| `SubStr(4,2)`   | `289LJ987`    | `LJ`    |
| `SubStr(4,999)` | `289LJ987`    | `LJ987` |

Asking for more characters than remain returns what there is rather than failing, which makes a large second argument the idiom for "everything from here on".
