[Newbies] Parsing and splitting file contents
r00tuk at gmail.com
Tue Sep 1 21:24:44 UTC 2009
Thanks everyone for the replies. I have not had a chance to try it yet, but
it was one of the methods that I had come across but was not sure if it was
the "best" one to use.
2009/8/29 K. K. Subramaniam <subbukk at gmail.com>
> On Saturday 29 Aug 2009 7:18:02 pm r00t uk wrote:
> > I am reading a tab delimited file into a string. I want to iterate
> > this string and split by tab, or any other defined value (, . | # tab,
> > etc.), delimiter into substrings which are assigned to a Collection
> > Dictionary, Bag, etc.), or instant variables.
> See String>linesDo: and its senders. For parsing a line into tokens, you
> use findTokens:
> >Again, I am surprised by the lack of examples demonstrating to newbies how
> >to perform basic operations such as this. I know it is not the smalltalk
> >way of learning, but it does raise the bar for making progress.
> Searching source code is quite easy in Squeak. In this case, I used
> (Alt+Shift+W) to bring up the message search tool and searched for "lines".
> Then I used senders/implementers to explore methods.
> HTH .. Subbu
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners