Text & patterns
Scalar
trim()
Removes any occurrences of any of the characters from either side of the string. characters defaults to space.
Arguments & returns
2 overloadstrim(string)
Scalar
| Overload link | string |
Returns |
|---|---|---|
| #01 | VARCHAR |
VARCHAR |
trim(string, characters)
Scalar
| Overload link | string | characters |
Returns |
|---|---|---|---|
| #02 | VARCHAR | VARCHAR |
VARCHAR |
Example
1 more ↓Haybarn WASM 1.5.5-rc3 · In your browser
Engine example · Run to view results.
More examples
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example · Run to view results.
In a query
Turn a label into a useful key.
Trim the edges, normalize case, and replace runs of spaces. Small functions compose into a readable cleaning step.
Haybarn WASM 1.5.5-rc3 · In your browser
Guide recipe · Run to view results.
In other engines
ClickHouse
SELECT LTRIM(s), RTRIM(s), TRIM(s)
SELECT LTRIM(s), RTRIM(s), TRIM(s)