determining NSString-length

neo36

UAAAARRRR!
i'm taking my first steps with cocoa, at the moment and i need some help with string operations.

is there a method (i'm sure there is ;) to determine the length of a NSString object?
does anybody know some good (online?) reference on Cocoa, you know, something where you can look up thinks like that...

thanks in advance...
 
Did you look in the docs in the /Developer directory. There is lots of stuff there.

As to your specific question the answer is "length" which returns an unsigned int. You may also be interested in length which returns the length of the NSString as a c string. These two values need not be the same if you are using multibyte character strings or other funky stuff.

Finally for easy browsing I use Appkido which I think you can get from here http://homepage.mac.com/aglee/downloads

-Eric
 
Back
Top