Re: Debugging problems
Re: Debugging problems
- Subject: Re: Debugging problems
- From: Ondra Cada <email@hidden>
- Date: Tue, 29 Mar 2005 00:43:17 +0200
Michael,
when I get a bit more time, I'll check the code. At quick scan, seems
to me the culprit is you release anything without waiting till the task
is done. Anyways...
On 29.3.2005, at 0:15, Michael Mulligan wrote:
I do, but I simply wanted to turn runs of spaces into one rather than
eliminating them entirely (and tr -s makes this an easy task and
required no extra coding on my part).
... well to be frank I would not call those 25-odd lines "no extra
coding". If you want a pretty ugly inefficient but easy solution, what
about, say
-(NSString *)removeExcessiveWhitespace {
NSString *s=[self stringByTrimmingCharactersInSet:[NSCharacterSet
whitespaceAndNewlineCharacterSet]];
NSArray *a;
while ([a=[s componentsSeparatedByString:@" "] count]>1) s=[a
componentsJoinedByString:@" "];
return s;
}
? :)))
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden