I figured I'd ask before I roll my own.. I'm looking for something
that will really be used with streams and will stop when the specified string is found.. If it doesn't exist then I'll gen one up.. Thx! _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
You mean like PositionableStream>>upToAll:? Dave Stevenson[hidden email] From: Rick Flower <[hidden email]> To: [hidden email] Sent: Wed, May 19, 2010 2:19:48 PM Subject: [vwnc] Anyone have an implementation of upTo: aString for use with either a string or stream? I figured I'd ask before I roll my own.. I'm looking for something that will really be used with streams and will stop when the specified string is found.. If it doesn't exist then I'll gen one up.. Thx! _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hmm.. That might just work.. Thx!!
On Wed, 19 May 2010 14:35:56 -0700 (PDT), Dave Stevenson <[hidden email]> wrote: > You mean like PositionableStream>>upToAll:? > Dave Stevenson > [hidden email] > > > > > ________________________________ > From: Rick Flower <[hidden email]> > To: [hidden email] > Sent: Wed, May 19, 2010 2:19:48 PM > Subject: [vwnc] Anyone have an implementation of upTo: aString for use > with either a string or stream? > > I figured I'd ask before I roll my own.. I'm looking for something > that will really be used with streams and will stop when the > specified string is found.. If it doesn't exist then I'll gen one > up.. Thx! > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Rick Flower
But note the gotcha: upTo:
leaves the position AFTER the search argument, upToAll: leaves the position
BEFORE the search argument. I've often wondered about this difference
(copyReplaceAll: 'wondered' with: 'cursed volubly' :->)
Using upToAndSkipThroughAll: will give you
the familiar 'AFTER' behaviour.
Cheers,
Steve From: [hidden email] on behalf of Rick Flower Sent: Thu 20/05/2010 00:40 To: Dave Stevenson Cc: [hidden email] Subject: Re: [vwnc] Anyone have an implementation of upTo: aString for use with either a string or stream? Hmm.. That might just work.. Thx!! _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On Thu, 20 May 2010 01:59:20 +0300, "Steven Kelly" <[hidden email]>
wrote: > But note the gotcha: upTo: leaves the position AFTER the search argument, > upToAll: leaves the position BEFORE the search argument. I've often > wondered about this difference (copyReplaceAll: 'wondered' with: 'cursed > volubly' :->) > > Using upToAndSkipThroughAll: will give you the familiar 'AFTER' behaviour. Actually in my case I'd prefer the 'BEFORE' behavior as it fits right in with my existing logic.. :) _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |