• 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: How to get the length of a string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 -----

References: 
 >How to get the length of a string? (From: Martin Kautz <email@hidden>)

  • Prev by Date: Sheet interferes with close widget and app quit
  • Next by Date: Re: Rotating an image
  • Previous by thread: Re: How to get the length of a string?
  • Next by thread: Re: How to get the length of a string?
  • Index(es):
    • Date
    • Thread