# text.last_index_of · Rell standard library · Chromia Docs (concept)

> pure function last_ index_ of(text: text ): integer Returns the index within this text of the last occurrence of the specified string,
or -1 if not found. 

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/text/last_index_of/

FUNCTION

# text.last\_index\_of

```signature
pure function last_index_of(text: text): integer
```

Returns the index within this text of the last occurrence of the specified string,
or -1 if not found.

**Parameters**

* **text** — the substring for which to search

Since 0.9.0

---

```signature
pure function last_index_of(text: text, max: integer): integer
```

Returns the index within this text of the last occurrence of the specified string,
starting from the specified startIndex, or -1 if not found.

**Parameters**

* **text** — the substring for which to search
* **max** — the index from which to start the reverse-search

Since 0.9.0

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/text/last_index_of.html)Generated API reference, mirrored from the live docs
