Re: How to get the length of a string?
Re: How to get the length of a string?
- Subject: Re: How to get the length of a string?
- From: "Todd Heberlein" <email@hidden>
- Date: Mon, 20 Aug 2001 10:55:32 -0700
- Organization: Net Squared, Inc.
Look in the on-line documentation for NSString under Foundation. There
are a couple of methods, the most obvious being "length".
n = [my_string length];
n = [my_string cStringLength];
If you want to have fun, you can return a C-style string and do a
strlen() on it. :-)
n = strlen([my_string cString]);
Todd
----- Original Message -----