Re: stringByTrimmingCharactersInSet
Re: stringByTrimmingCharactersInSet
- Subject: Re: stringByTrimmingCharactersInSet
- From: Diggory Laycock <email@hidden>
- Date: Thu, 19 Sep 2002 13:41:30 +0100
whiteSpaceCharacterSet is a Class method of NSCharacterSet - not a
constant.
You should try this:
someString= [Text stringByTrimmingCharactersInSet: [NSCharacter set
whitespaceCharacterSet]];
n.b. - note this will 'Trim' - i.e. take spaces from beginning and end
- not the middle.
This caught me out the other day:
e.g.
" foo " -> "foo"
" f o o " -> "f o o"
Digs.
On Thursday, September 19, 2002, at 01:10 pm, Claudius Sailer wrote:
Hi,
I am using the following:
[Text stringByTrimmingCharactersInSet:whitespaceCharacterSet]
and the debugger says "WhitespaceCharacterSet undeclared (first use in
this function)" Why?
I only want to "trim" the NSString Text!!!
Claudius
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
Diggory Laycock
-----------------------
http://www.diggory.net
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.