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

Re: Int to NSString


  • Subject: Re: Int to NSString
  • From: Cryx <email@hidden>
  • Date: Thu, 2 May 2002 21:10:55 -0500

Use either:
[NSString stringWithFormat:@"%d",[mergeArray count]];
or:
[[NSNumber numberWithInt:[mergeArray count]] stringValue];

On Thursday, May 2, 2002, at 08:46 PM, Ben Mackin wrote:

How do I convert an integer to an NSString? I have been looking over apples
site, and just cant find it.

What I am doing is creating an NSArrary, and then filling it as follows:

mergeArray = [[NSFileManager defaultManager]
directoryContentsAtPath:@"/tmp/receive"];

Then I am trying to do this:

logString = [ fileNameString stringByAppendingString:[mergeArray count]];

Which doesn't work, I need to convert the int returned by [mergeArray count]
into an NSString so I can use it in the output (I am then writing logString
to a file on the disk)

Thanks,
Ben
_______________________________________________
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.
_______________________________________________
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: 
 >Int to NSString (From: Ben Mackin <email@hidden>)

  • Prev by Date: Re: Int to NSString
  • Next by Date: Lossless PDF scaling
  • Previous by thread: Re: Int to NSString
  • Next by thread: Lossless PDF scaling
  • Index(es):
    • Date
    • Thread