how would i strip leading spaces from say text like this:
" Text is here"
i just put quotes around the text to show the spaces in front.
i tried a little function something like this, but it doesn't seem to be doing what i want it to do.
func StripLSpaces : string
param string targetline
string result,char
integer str_length,pos,match
strlen targetline str_length
str_length--
result = targetline
for pos = 0 UPTO str_length
substr char targetline pos 1
strcmp char " " match
if match = 0
strdelete result pos 1
else
exitfor
endif
endfor
return result
endfunc ; StripLSpaces function
its probably a simple mistake i'm doing, I will keep playing with it and try and figure out whtas wrong
" Text is here"
i just put quotes around the text to show the spaces in front.
i tried a little function something like this, but it doesn't seem to be doing what i want it to do.
func StripLSpaces : string
param string targetline
string result,char
integer str_length,pos,match
strlen targetline str_length
str_length--
result = targetline
for pos = 0 UPTO str_length
substr char targetline pos 1
strcmp char " " match
if match = 0
strdelete result pos 1
else
exitfor
endif
endfor
return result
endfunc ; StripLSpaces function
its probably a simple mistake i'm doing, I will keep playing with it and try and figure out whtas wrong