Overview
The rtrim() function removes any trailing spaces of a string and returns the modified string.
Syntax
rtrim(str)
| Argument | Type | Description | 
|---|---|---|
| str | String | The string to modify | 
Return type: String
Example of Result
return rtrim("cloud    ")
Result: cloud
Example of Use
Remove any trailing spaces from the input before saving it into the database.
with "[email protected] " as input
insert().into(@user).nodes({email: rtrim(input)})
 
        