Forum Discussion

jackhand's avatar
jackhand
Visitor
8 years ago

StrI() Function create whitespace

I noticed the StrI() Function create whitespace in front of the string. For example the following operation StrI(3) produces the following string " 3" instead of "3".

The following is how I am currently eliminating the leading whitespace; however, is there a better way?

sString = StrI(n)
nWhitespace = Instr(1, sString , " ")
if nWhitespace = 1 then
   sString = Mid(sString , 2)
end if