github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/string/trimsuffix.mdx (about) 1 --- 2 layout: docs 3 page_title: trimsuffix - Functions - Configuration Language 4 description: |- 5 The trimsuffix function removes the specified suffix from the end of a 6 given string. 7 --- 8 9 # `trimsuffix` Function 10 11 `trimsuffix` removes the specified suffix from the end of the given string. 12 13 ## Examples 14 15 ```shell-session 16 > trimsuffix("helloworld", "world") 17 hello 18 ``` 19 20 ## Related Functions 21 22 - [`trim`](/docs/job-specification/hcl2/functions/string/trim) removes characters at the start and end of a string. 23 - [`trimprefix`](/docs/job-specification/hcl2/functions/string/trimprefix) removes a word from the start of a string. 24 - [`trimspace`](/docs/job-specification/hcl2/functions/string/trimspace) removes all types of whitespace from 25 both the start and the end of a string.