mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-21 10:47:34 -05:00
26 lines
401 B
Plaintext
26 lines
401 B
Plaintext
---
|
|
sidebar_label: strcontains
|
|
description: |-
|
|
The strcontains function checks whether a given string can be found within another string.
|
|
---
|
|
|
|
# `strcontains` Function
|
|
|
|
`strcontains` function checks whether a substring is within another string.
|
|
|
|
```hcl
|
|
strcontains(string, substr)
|
|
```
|
|
|
|
## Examples
|
|
|
|
```
|
|
> strcontains("hello world", "wor")
|
|
true
|
|
```
|
|
|
|
```
|
|
> strcontains("hello world", "wod")
|
|
false
|
|
```
|