you may have to resort to a simple loop similar to this:
space_flag = FALSE
j = 0;
alen = a.len(); //for efficiency
for (i = 0; i < alen; i++)
{
b[j] = a[i];
j++;
if (isspace(a[i]) != 0)
{
while ( ((i+1) < alen) && (isspace(a[i+1]) != 0) )
i++; //chew extra whitespace
}
}
Make sure and test this if you use it.. I'm not guaranteeing it to be
100% correct. ;-)
Thanks.
On Tue, 28 Jan 2003, Jessica Biola wrote:
> Can anyone give me a clue as to how to remove multiple
> spaces from a String?
>
> Also, is there a better way to do search and replace
> other than Stringname.replace('a','b')? I'd really
> like to use regular expressions on the first matching
> comparison value.
>
> -Jes
>
> p.s. I'm using htdig-3.2.0b4 and I'm in Display.cc
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> htdig-dev mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/htdig-dev
>
Neal Richter
Knowledgebase Developer
RightNow Technologies, Inc.
Customer Service for Every Web Site
Office: 406-522-1485
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev