Re: What can I do with an NSRange in Objective-C?
Re: What can I do with an NSRange in Objective-C?
- Subject: Re: What can I do with an NSRange in Objective-C?
- From: Steve Christensen <email@hidden>
- Date: Sun, 8 Feb 2004 14:49:29 -0800
On Feb 8, 2004, at 2:22 PM, Jerry Krinock wrote:
[snip]
The only thing I can find to do with this NSRange is to convert it to
a string using NSStringFromRange (which is an "Objective-C Classic"
function), and then parse the string to get the "range" and "length"
integers.
Am I missing something?
I do find this declaration:
typedef struct _NSRange {unsigned int location; unsigned int length;}
NSRange;
Can I dig into this struct and access those two ints the old-fashioned
way?
Sure. As you noted, NSRange is just a plain-ole struct, so you have
access to all fields. Accessor methods would just be overkill.
_______________________________________________
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.