• 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: Fastest way to replace characters in string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fastest way to replace characters in string


  • Subject: Re: Fastest way to replace characters in string
  • From: Esteban Torres <email@hidden>
  • Date: Wed, 21 Aug 2013 17:50:11 -0600

Don't know if this helps you Diederik but from what I've read the parser developed by Oliver Drobnik would be a good place to start on implementing your own or even using his DTHTMLParser: http://www.cocoanetics.com/2013/08/dtfoundation-1-5-2/

Regards,
--
Esteban Torres
(+506)8813-0934
Skype: esteban.a.torres.hernandez


On Wednesday, August 21, 2013 at 5:44 PM, Diederik Meijer | Ten Horses wrote:

> Dear list,
>
> I have an iOS app that loads a local html file into a UIWebView.
>
> The content is quite large, about 1MB, it is the full text of a law.
>
> By tapping a button, users can reveal the number of published court rulings for each of the law's articles.
>
> As this data changes frequently, a list that has a court ruling count for each article is downloaded from a web service.
>
> The web service returns the list lightning fast, but in order to get the count number added to each of the >300 articles html <h4> header, I am looping through the list and call NSString's stringByReplacingOccurancesOfString:withString: on each item.
>
> There must be a more efficient way to update the html string loaded from the local file, obviously doing more than 300 of these replace actions is slow and inefficient.
>
> Does anybody here know of a better way to handle this?
>
> Many thanks!
>
> diederik
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden (mailto: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 (http://lists.apple.com)
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden (mailto:email@hidden)

_______________________________________________

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


References: 
 >Fastest way to replace characters in string (From: Diederik Meijer | Ten Horses <email@hidden>)

  • Prev by Date: Fastest way to replace characters in string
  • Next by Date: Re: Fastest way to replace characters in string
  • Previous by thread: Fastest way to replace characters in string
  • Next by thread: Re: Fastest way to replace characters in string
  • Index(es):
    • Date
    • Thread