Question:
How can I remove blank spaces from a variable? For example, the text “Elipse Software Ltd.” is in a variable, but I want to display “ElipseSoftwareLtd.” instead.
Solution:
To do so, you can write the following script:
Dim aux, tmp, auxValue
tmp = Len(WithBlankSpaces)
WithoutBlankSpaces = “”
for aux = 0 to tmp – 1
auxValue = Mid(WithBlankSpaces,aux,1)
If auxValue <> ” “
WithoutBlankSpaces = WithoutBlankSpaces + auxValue
Endif
Next
In this script, WithBlankSpaces is a RAM Tag that receives the original text (in this case, “Elipse Software Ltd.”), and WithoutBlankSpaces is the RAM Tag that receives the script’s result (in this case, “ElipseSoftwareLtd.”).