• 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: convert int to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert int to NSString


  • Subject: Re: convert int to NSString
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 22 Apr 2004 00:40:02 -0400

On Apr 22, 2004, at 12:18 AM, Adam wrote:

If I have an int

(int x = 27)

how do I convert it into an NSString so I can display it somewhere in the GUI?

A couple ways I can think of:

NSString *sx;

sx = [NSString stringWithFormat:@"%d", x];

sx = [[NSNumber numberWithInt: x] stringValue];

sherm--
_______________________________________________
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.


  • Follow-Ups:
    • Re: convert int to NSString
      • From: John Randolph <email@hidden>
References: 
 >convert int to NSString (From: Adam <email@hidden>)

  • Prev by Date: Re: convert int to NSString
  • Next by Date: Re: Creating a criteria search view
  • Previous by thread: Re: convert int to NSString
  • Next by thread: Re: convert int to NSString
  • Index(es):
    • Date
    • Thread