Archived

This topic is now archived and is closed to further replies.

Draco5869

delete all spaces in vb string

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites