• 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: NSRange
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRange


  • Subject: Re: NSRange
  • From: Randall Meadows <email@hidden>
  • Date: Wed, 14 May 2008 17:33:59 -0600

On May 14, 2008, at 5:25 PM, Mr. Gecko wrote:

Hello I am trying to find out how to get characters in the middle of two characters I have heard of NSRange but I can't find documentation to it in xcode.

<file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html >


So here is what I am trying to do in this html page on line there are to points which stays the same and in the middle of the points is what I need here is an example.
<a href="example.com" title="Ttitle">text I want</a>
so I want to get the text in the middle of points title="Ttitle"> and </a>
Here is what I tried and did not work


NSString *url = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.example.com/file.html";]];
NSString *s = url;
NSRange f, l;


f = [url rangeOfString:@"{\" title=\"Ttitle\">"];

Maybe it failed because your source string ("url", which is not a URL, BTW) does NOT have a { character in it? (I'm thinking perhaps you accidently added the { when you typed the ".)



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSRange
      • From: "Mr. Gecko" <email@hidden>
References: 
 >NSRange (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Re: show/hide NSTabView
  • Next by Date: Re: show/hide NSTabView
  • Previous by thread: NSRange
  • Next by thread: Re: NSRange
  • Index(es):
    • Date
    • Thread