/[cvs]/api/Classes/Examples/String/StringTest7.cpp
ViewVC logotype

Annotation of /api/Classes/Examples/String/StringTest7.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sun Jul 1 20:47:58 2001 UTC (23 years, 5 months ago) by bearsoft
Branch point for: lazy, MAIN
Initial revision

1 bearsoft 1.1 #include "../../String/String.h"
2     #include "../../String/StringInput.h"
3     #include "../../System/System.h"
4     #include "StringTest7.h"
5     #include "../../System/SystemDefine.h"
6    
7    
8     StringTest7::StringTest7(){}
9     StringTest7::~StringTest7(){}
10    
11     void StringTest7::run()
12     {
13     StringInput *stringInput=new StringInput();
14    
15     stringInput->readFile("data/rowTest.txt");
16    
17     stringInput->dontDefragMemory(1000); // select this if you want to have intern word buffer == less malloc, free
18    
19     int rowCounter=0;
20    
21     while (stringInput->getScanWordStatus())
22     {
23     String temp=stringInput->scanWord();
24    
25     if(stringInput->getScanWordStatus())
26     {
27     System::println(temp.buffer);
28    
29     if (stringInput->getScanRowStatus())
30     {
31     System::println("new Row!!");
32     }
33     }
34     }
35    
36     System::println(rowCounter);
37     System::println(stringInput->getRowNumber());
38    
39     stringInput->resetScanWord(); //moves the pointer to the begining of the string buffer again
40    
41     delete stringInput;
42    
43     }

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26