Remedy – Remove spaces from string
- Lubos Strejcek
- May 11, 2016
- 1 min read
Updated: Jun 15, 2021
Never trust your users. Here is the tip to remove spaces from string.
Run-If: 'FIELD' LIKE "% "
This remove space before:
Set-Field: zInt = LENGTH($FIELD$)
Set-Field: Field = SUBSTR($FIELD$,0,zInt-1)
This remove spaces before and after string:
Set-Field: Field = LTRIM(RTRIM($FIELD$))
This remove all spaces from string:
Set-Field: REPLACE($FIELD$," ","")
Comments