• 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: NSString's intValue method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString's intValue method


  • Subject: Re: NSString's intValue method
  • From: p3consulting <email@hidden>
  • Date: Mon, 19 Apr 2004 12:41:10 +0200

Let's try this:

@interface NSString(UIntValue)

- (unsigned int)uintValue;

@end

@implementation NSString(UIntValue)

- (unsigned int)uintValue
{
return strtoul([self cString], NULL, 10);
}

@end

Pascal Pochet
email@hidden

Le avr. 19, 2004, ` 07:15, Matt Jaffa a icrit :

Hi,

I have a NSString that contains an unsigned int value,

I am trying to get that value out, but if it is greater then the int max value
it always returns INT_MAX, but that is probably because I am using
NSString's intValue method which returns an integer and not the unsigned int that I desire.

Any way to do this?

Thanks,
Matt
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSString's intValue method
      • From: Ondra Cada <email@hidden>
References: 
 >NSString's intValue method (From: Matt Jaffa <email@hidden>)

  • Prev by Date: Re: sheet weirdness
  • Next by Date: Re: NSString's intValue method
  • Previous by thread: Re: NSString's intValue method
  • Next by thread: Re: NSString's intValue method
  • Index(es):
    • Date
    • Thread