Re: RE: Trim
From: Jimi (jimi_with_an_i_at_yahoo-dot-ca.no-spam.invalid)
Date: 05/07/04
- Next message: Anon: "Re: Encrypted FTP?"
- Previous message: Venkat Srinivasan.R: "RE: How to make Help Window not modal"
- In reply to: Raterus: "Trim "inbetween" whitespace"
- Next in thread: Larry Serflaten: "Re: RE: Trim"
- Reply: Larry Serflaten: "Re: RE: Trim"
- Reply: Peter Reggio: "Re: RE: Trim"
- Messages sorted by: [ date ] [ thread ]
Date: 7 May 2004 14:00:58 -0500
> Gary Miltonwrote:
Hi Michael,
>
> Try this...
>
> \\\
> Dim MyString As String = "one two three four five"
>
> Do While (MyString.IndexOf(" ") >= 0)
> MyString = MyString.Replace(" ", " ")
> Loop
> ///
>
> HTH,
> Gary
I believe the original question asked for any approach other than the
one you gave. I don't believe there is any way to solve this problem
more efficiently than an unknown number of replaces. (you could use
regular expressions, but my experience indicates that they would not
be nearly as efficient as the indicated loop).
I'd be curious to see if anyone has an alternative solution.
- Next message: Anon: "Re: Encrypted FTP?"
- Previous message: Venkat Srinivasan.R: "RE: How to make Help Window not modal"
- In reply to: Raterus: "Trim "inbetween" whitespace"
- Next in thread: Larry Serflaten: "Re: RE: Trim"
- Reply: Larry Serflaten: "Re: RE: Trim"
- Reply: Peter Reggio: "Re: RE: Trim"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|