|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Clear spaces between texHallo,
How can i Clear empty spaces between text. For example: I've got the name "Justin Name" in a string and want to clear de spaces between de names so i will get "JustinName". What can i use to do that? TIA Jan use the VB 'Replace' function
newString = Replace(myString," ","") hth Guy Show quoteHide quote "Jan" wrote: > Hallo, > > How can i Clear empty spaces between text. > For example: > > I've got the name "Justin Name" in a string and want to clear de spaces > between de names so i will get "JustinName". > > What can i use to do that? > > TIA Jan > Try
Replace("Justin Name", " ", "") Fred Jan wrote: Show quoteHide quote > Hallo, > > How can i Clear empty spaces between text. > For example: > > I've got the name "Justin Name" in a string and want to clear de spaces > between de names so i will get "JustinName". > > What can i use to do that? > > TIA Jan On Mon, 4 Dec 2006 13:59:48 +0100, Jan wrote:
> Hallo, You can also try this:> > How can i Clear empty spaces between text. > For example: > > I've got the name "Justin Name" in a string and want to clear de spaces > between de names so i will get "JustinName". > > What can i use to do that? > > TIA Jan imports System.Text.RegularExpressions newString = Regex.Replace(oldString,"\s+","") This way has the added benefit that it also takes care of tabs |
|||||||||||||||||||||||