Thanks, Adam! On 2009-01-15 15:03, "Adam R. Maxwell" <amaxw...@mac.com> wrote:
> > On Jan 15, 2009, at 12:36 AM, Gregory Jefferis wrote: > >> I've factored out my DOI parsing into an NSString category. I >> wondered >> >> 1) if this looks ok (I know it works) > Looks fine to me... matchAtIndex:n returns nil if n > the match > count, right? Yup. >> 2) where the best place to put it is. Right now it's in >> >> BibItem_PubMedLookup > > FWIW...I don't think there's much point in making it a category method > until it's needed in multiple places. I like static functions near > the call point, but that's just me :). I see. OK. Well I guess I'll leave it for now, but maybe next time just a static method. >> 3) is it worthwhile/possible trying to make the regexes static if it >> gets >> used a lot? > > It's likely not worth the memory overhead unless it's called thousands > of times in a loop (i.e. during file parse/save). I've gone overboard > on statics in various places. OK. Thanks again. Greg. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop