Reference to the trim, strip, stripLeading, and stripTrailing string manipulation function
Summary
trim(metric|source|<pointTagKey>, <tsExpression>)
strip(metric|source|<pointTagKey>, <tsExpression>)
stripLeading(metric|source|<pointTagKey>, <tsExpression>)
stripTrailing(metric|source|<pointTagKey>, <tsExpression>)
Functions for removing white space (blanks) from the specified metadata string.
Parameters
| Parameter | Description |
|---|---|
| metric|source|<pointTagKey> | The metadata string (metric name, source name, or value of a point tag key) to remove white space from. |
| tsExpression | The expression that describes the time series with the metadata string to be trimmed or stripped. |
Description
We support several functions for handling white spaces (blank) in a metadata string of a time series.
isBlank()returns true if a string contains only white spaces and returns false otherwise.trim()removes a single leading white space and a single trailing white space, but does not remove multiple leading or trailing white spaces.strip()removes both leading and trailing white spaces from a string.stripLeading()removes leading white spaces but leaves trailing white spaces.stripTrailing()removes trailing white spaces but leaves leading white spaces.