I want to know how to remove space in a string.
For Example take a string a= "Hello World"
. Once the whitespace is found then "Hello"
and "World"
Should be Separated and get stored in separate Strings.
Like b="Hello"
and c="World"
. It is possible to do. Can anyone help me.
Thanks in advance.
Do a
var words = a.Split(' ');
This will return an array with each word in one
foreach(var word in words)
{
Trace.WriteLine(word);
}
http://msdn.microsoft.com/en-us/library/b873y76a.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With