ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/libmdtools/StreamTokenizer.cpp
Revision: 1334
Committed: Fri Jul 16 18:58:03 2004 UTC (19 years, 11 months ago) by gezelter
File size: 512 byte(s)
Log Message:
Initial import of OOPSE-1.0 source tree

File Contents

# User Rev Content
1 gezelter 1334 //: C07:StreamTokenizer.cpp {O}
2     // From "Thinking in C++, 2nd Edition, Volume 2"
3     // by Bruce Eckel & Chuck Allison, (c) 2001 MindView, Inc.
4     // Available at www.BruceEckel.com.
5     //{-g++295}
6    
7     #include "StreamTokenizer.hpp"
8     using namespace std;
9    
10     string StreamTokenizer::next() {
11     string result;
12     if(p != end) {
13     insert_iterator<string>
14     ii(result, result.begin());
15     while(isDelimiter(*p) && p != end)
16     p++;
17     while (!isDelimiter(*p) && p != end)
18     *ii++ = *p++;
19     }
20     return result;
21     } ///:~