Merge pull request #28745 from hashicorp/jbardin/substr

negative substring indexes
pull/29032/head
James Bardin 5 years ago committed by GitHub
commit d27a6d3d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,3 +29,12 @@ bytes:
> substr("🤔🤷", 0, 1)
🤔
```
The offset index may be negative, in which case it is relative to the end of
the given string. The length may be -1, in which case the remainder of the
string after the given offset will be returned.
```
> substr("hello world", -5, -1)
world
```

Loading…
Cancel
Save