Merge pull request #25339 from jessica-ritter/patch-1
Trimprefix: what happens when prefix is not in string?
This commit is contained in:
commit
377b99907b
|
@ -13,7 +13,7 @@ description: |-
|
||||||
earlier, see
|
earlier, see
|
||||||
[0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html).
|
[0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html).
|
||||||
|
|
||||||
`trimprefix` removes the specified prefix from the start of the given string.
|
`trimprefix` removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@ earlier, see
|
||||||
world
|
world
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
> trimprefix("helloworld", "cat")
|
||||||
|
helloworld
|
||||||
|
```
|
||||||
|
|
||||||
## Related Functions
|
## Related Functions
|
||||||
|
|
||||||
* [`trim`](./trim.html) removes characters at the start and end of a string.
|
* [`trim`](./trim.html) removes characters at the start and end of a string.
|
||||||
|
|
Loading…
Reference in New Issue