> For the complete documentation index, see [llms.txt](https://docs.cheddar.vihan.org/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheddar.vihan.org/docs/standard-library/string/test.md).

# Test

| type   | returns   |
| ------ | --------- |
| Method | `boolean` |

## Arguments

| name  | type  | description                |
| ----- | ----- | -------------------------- |
| regex | regex | Regex to verify if matches |

## Explanation

Determines if given `regex` matches the string.

## Examples

```swift
"Goat".test(/oat/) == true
"HeLlO".test(/hello/i) == true
```
