• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSString equivalent of CFSTR macro?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString equivalent of CFSTR macro?


  • Subject: NSString equivalent of CFSTR macro?
  • From: Rick Mann <email@hidden>
  • Date: Mon, 4 Dec 2017 14:47:24 -0800

I have to use some C header file that #defines some string constants. Is there
an equivalent to CFSTR() that constructs NSString literals? E.g.,


#define NSSTR(s)                                (@ ## s) <-- magic; this
doesn't work
#define kSomeCStringConstant                    "foo"
...
NSSTR(kSomeCStringConstant)

TIA,

--
Rick Mann
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSString equivalent of CFSTR macro?
      • From: Alastair Houghton <email@hidden>
    • Re: NSString equivalent of CFSTR macro?
      • From: Ben Kennedy <email@hidden>
  • Prev by Date: Re: Stopping on a system call and determining open files?
  • Next by Date: Re: NSString equivalent of CFSTR macro?
  • Previous by thread: Re: Loading very large image files (>10GB)
  • Next by thread: Re: NSString equivalent of CFSTR macro?
  • Index(es):
    • Date
    • Thread