Re: (newbie question) Putting special characters in NSStrings
Re: (newbie question) Putting special characters in NSStrings
- Subject: Re: (newbie question) Putting special characters in NSStrings
- From: Matt Neuburg <email@hidden>
- Date: Fri, 18 Mar 2005 12:40:55 -0800
On Fri, 18 Mar 2005 11:33:36 -0800, Ben Borofka <email@hidden> said:
>I have a bunch of special characters I need to put in NSStrings and
>NSArrays of NSStrings:
>
>" ! @ # $ % ^ *
>
>I've been just using, for example, [[NSString alloc ]
>initWithString:@"!"] to create the string but I don't think they are
>working for all those special characters. What's the best way to put
>those into an NSString? I can't find any simple, easy examples.
- (IBAction)myAction:(id)sender
{
NSArray* a = [NSArray arrayWithObjects:
@"\"",
@"!",
@"#",
@"$",
@"%",
@"^",
@"*",
nil];
NSLog(@"%@",a);
}
2005-03-18 12:38:07.366 crud[6369] <CFArray 0x376420 [0xa01900e0]>{type =
immutable, count = 7, values = (
0 : "
1 : !
2 : #
3 : $
4 : %
5 : ^
6 : *
)}
It works fine. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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