On Fri, Dec 5, 2008 at 11:09 AM, BCS <[EMAIL PROTECTED]> wrote: > Reply to Bill, > >>>>> On Wed, Dec 3, 2008 at 6:37 PM, rocknroll714 >>>>> <[EMAIL PROTECTED]> wrote: >>>>> >>>>>> I'm looping through a text file using the File.getline() >>>>>> command >> >> scope thestream = new std.stream.MemoryStream(thebuffer); >> > > One new MemoeryStream per line!?!?
It's scope! No worries mate! ;-) But seriously, it does sound heavyweight compared to a single sscanf function call. Honestly, std.stream is just barely functional enough to write the simplest stream code, so I wouldn't be surprised if that's what it takes to scan strings with it. Not much worse than what it takes to do it with std::stream in c++ though. I'm really talking out of my ass though, because I can probably count on one hand how many times written code to use scanf or stringstream in my life. If I have to parse input I'm much more likely to reach for the regexp hammer or write a simpler parser. --bb