mirror of https://github.com/hashicorp/terraform
parent
fd3798b276
commit
2278d30857
@ -0,0 +1,30 @@
|
||||
---
|
||||
page_title: endswith - Functions - Configuration Language
|
||||
description: |-
|
||||
The endswith function takes a given string and a given suffix value,
|
||||
and returns true if the first given string contains the given value at its end.
|
||||
---
|
||||
|
||||
# `endswith` Function
|
||||
|
||||
`endswith` takes a given string and a given suffix value,
|
||||
and returns true if the first given string contains the given value at its end.
|
||||
|
||||
```hcl
|
||||
endswith(string, suffix)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
> endswith("hello world", "world")
|
||||
true
|
||||
|
||||
> endswith("hello world", "hello")
|
||||
false
|
||||
```
|
||||
|
||||
## Related Functions
|
||||
|
||||
- [`startswith`](/language/functions/startswith) takes a given string and a given prefix value,
|
||||
and returns true if the first given string contains the given value at its beginning
|
||||
@ -0,0 +1,30 @@
|
||||
---
|
||||
page_title: startsswith - Functions - Configuration Language
|
||||
description: |-
|
||||
The startswith function takes a given string and a given prefix value,
|
||||
and returns true if the first given string contains the given value at its beginning.
|
||||
---
|
||||
|
||||
# `startswith` Function
|
||||
|
||||
`startswith` takes a given string and a given prefix value,
|
||||
and returns true if the first given string contains the given value at its beginning.
|
||||
|
||||
```hcl
|
||||
startswith(string, prefix)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
> startswith("hello world", "hello")
|
||||
true
|
||||
|
||||
> startswith("hello world", "world")
|
||||
false
|
||||
```
|
||||
|
||||
## Related Functions
|
||||
|
||||
- [`endswith`](/language/functions/endswith) takes a given string and a given suffix value,
|
||||
and returns true if the first given string contains the given value at its end
|
||||
Loading…
Reference in new issue