ganesh_kapase
27th October 2005, 06:56
Hi

Please tell me command with example to remove the blank spaces from a string.
Example : If string xx is of 10 chars as
"Ganesh "
" Ganesh"
" Ganesh "

How to remove space from xx string to get result as "Ganesh" ??

Thanx


Ganesh

patvdv
30th October 2005, 20:58
Ganesh,

If you got the answer then please also post it here. Other people may benefit from it as well.

Hitesh Shah
31st October 2005, 08:31
U can remove the leading/trailing spaces (as illustrated in ur examples) by strip$(shiftl$(xx)) statement . To remove embedded space , u need to use pos / rpos function to find the space in a string .

norwim
1st November 2005, 11:51
long i
string istring(100)
string ostring(100)
ostring=""
for i=1 to len(istring)
if istring(i;1)<>" " ostring=ostring & istring(i;1)
endfor

regards
Norbert