github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/website/docs/configuration/functions/trimprefix.html.md (about) 1 --- 2 layout: "functions" 3 page_title: "trimprefix - Functions - Configuration Language" 4 sidebar_current: "docs-funcs-string-trimprefix" 5 description: |- 6 The trimprefix function removes the specified prefix from the start of a 7 given string. 8 --- 9 10 # `trimprefix` Function 11 12 -> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and 13 earlier, see 14 [0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html). 15 16 `trimprefix` removes the specified prefix from the start of the given string. 17 18 ## Examples 19 20 ``` 21 > trimprefix("helloworld", "hello") 22 world 23 ``` 24 25 ## Related Functions 26 27 * [`trim`](./trim.html) removes characters at the start and end of a string. 28 * [`trimsuffix`](./trimsuffix.html) removes a word from the end of a string. 29 * [`trimspace`](./trimspace.html) removes all types of whitespace from 30 both the start and the end of a string.