delete all spaces in vb string
How can i clear all of the spaces in a string so if i would go from
"this is a string"
to
"thisisastring"
Nub question, thanks
-----------------------------------------------------------
Like a sponge!
The easiest way to do it is to copy the string to another
string (array).
Loop the string through character by character, and compare them with '' '' (space), if it''s NOT space, copy the character, to the other string, and increment the counters.
if it IS space, just increment the first strings counter and keep going..
string (array).
Loop the string through character by character, and compare them with '' '' (space), if it''s NOT space, copy the character, to the other string, and increment the counters.
if it IS space, just increment the first strings counter and keep going..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement