Skip to content

Commit

Permalink
docs: add strcontains function doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mogrogan authored and lbajolet-hashicorp committed Dec 5, 2024
1 parent 0ddcbaf commit 3568226
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
page_title: strcontains - Functions - Configuration Language
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
```
4 changes: 4 additions & 0 deletions website/data/docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@
"title": "split",
"path": "templates/hcl_templates/functions/string/split"
},
{
"title": "strcontains",
"path": "templates/hcl_templates/functions/string/strcontains"
},
{
"title": "strrev",
"path": "templates/hcl_templates/functions/string/strrev"
Expand Down

0 comments on commit 3568226

Please sign in to comment.