LTRIM
All functions > STRING > LTRIM
Returns the string with whitespace from the left (beginning) removed.
Signatures
Returns: String with leading whitespace removed
LTRIM(string: VARCHAR) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
string | VARCHAR | Yes | String to trim |
Notes
- Removes spaces, tabs, newlines from the beginning only
- Trailing whitespace is preserved
- Middle whitespace is preserved
Examples
FeatureQL
SELECT
f1 := LTRIM(' hello '), -- Trim left only
f2 := LTRIM(' world '), -- Trim tab from left
f3 := LTRIM(' mixed spaces '), -- Only left trim
f4 := LTRIM('no trim needed') -- No left whitespace
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| hello | world | mixed spaces | no trim needed |
On this page