strings.trimRight() function
strings.trimRight()
removes trailing characters specified in the cutset from a string.
Function type signature
(cutset: string, v: string) => string
Parameters
v
(Required) String to to remove characters from.
cutset
(Required) Trailing characters to trim from the string.
Only characters that match the cutset string exactly are trimmed.
Examples
Trim trailing periods from all values in a column
import "strings"
data
|> map(fn: (r) => ({r with _value: strings.trimRight(v: r._value, cutset: ".")}))
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.