• 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
Re: NSNumber -> NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumber -> NSString


  • Subject: Re: NSNumber -> NSString
  • From: "Clark S. Cox III" <email@hidden>
  • Date: Wed, 13 Mar 2002 16:34:54 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Wednesday, March 13, 2002, at 04:15 , Lukasz Kuczborski wrote:

Anyone know how to convert NSNumber to NSString? (what method?)

I want to get file's creator and code...but NSFileHFSCreatorCode and
NSFileHFSTypeCode gives me numbers like: "1276423498", and i want to get it
in String like: "hlmg" - creator, "ddsk" - code.

Any ideas?

Off the top of my head:

NSNumber *num = ...
unsigned code = [ num unsignedIntValue ];
NSString *string = [ NSString stringWithCString: (char *)&code length: sizeof unsigned ];

- --
Clark S. Cox, III
email@hidden
http://clarkcox.dyndns.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjyPxgUACgkQd6STocYT1xX0lgCgksFxKNDfnJHC5wDGJlmT+sEy
Wv8AnjXHWf1OaBEh1LXvzdqqpzCRiiAd
=H3n9
-----END PGP SIGNATURE-----
_______________________________________________
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.

References: 
 >NSNumber -> NSString (From: Lukasz Kuczborski <email@hidden>)

  • Prev by Date: Workaround to force painting of NSSplitView's split-bar?
  • Next by Date: Re: NSNumber -> NSString
  • Previous by thread: NSNumber -> NSString
  • Next by thread: Re: NSNumber -> NSString
  • Index(es):
    • Date
    • Thread