I'd like to define a global string constant consisting of two ASCII start-of-text (STX, 0x02) characters.

The following ^code^ will create such a thing:

NSString* two = [[NSString alloc] initWithFormat:@"%C%C", 0x2, 0x2] ;

and I realize that I could put it in some +initialize method for a class that was "guaranteed" to be created, but that solution is rather fragile, non-portable, etc.

I also appreciate that I'm creating an object, but gee it's a really simple object, and since Xcode can do this:

NSString* const hello = @"Hello" ;

Is there a way to put non-printing characters in a constant string like that?

Thanks,

Jerry Krinock
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to