676 B
676 B
| title | description | menu | weight | ||||||
|---|---|---|---|---|---|---|---|---|---|
| strings.trimSpace() function | The strings.trimSpace() function removes leading and trailing spaces from a string. |
|
301 |
The strings.trimSpace() function removes leading and trailing spaces from a string.
Output data type: String
import "strings"
strings.trimSpace(v: " abc ")
// returns "abc"
Paramters
v
The string value from which to trim spaces.
Data type: String
Examples
Trim leading and trailing spaces from all values in a column
import "strings"
data
|> map(fn:(r) => strings.trimSpace(v: r.userInput))