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

> pure function contains(text: text ): boolean Checks if this text contains the specified substring. Note that for all texts t , t.contains('') is true, and 

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

FUNCTION

# text.contains

```signature
pure function contains(text: text): boolean
```

Checks if this text contains the specified substring.

Note that for all texts `t`, `t.contains('')` is true, and for all texts `u` and `v` such
that `u == v`, `u.contains(v)` is true.

`t.contains(u)` is equivalent to `t.index_of(u) >= 0`.

**Parameters**

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

**Returns**

true if this text contains the specified substring, false otherwise

Since 0.6.0

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