1 |
bearsoft |
1.1 |
#include "../../String/String.h"
|
2 |
|
|
#include "../../String/StringInput.h"
|
3 |
|
|
#include "../../System/System.h"
|
4 |
|
|
#include "StringTest4.h"
|
5 |
|
|
#include "../../System/SystemDefine.h"
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
StringTest4::StringTest4(){}
|
9 |
|
|
StringTest4::~StringTest4(){}
|
10 |
|
|
|
11 |
|
|
void StringTest4::run()
|
12 |
|
|
{
|
13 |
|
|
StringInput *stringInput=new StringInput();
|
14 |
|
|
|
15 |
|
|
stringInput->readFile("data/test.txt");
|
16 |
|
|
|
17 |
|
|
stringInput->dontDefragMemory(1000); // select this if you want to have intern word buffer == less malloc, free
|
18 |
|
|
|
19 |
|
|
float *pointer=stringInput->findAWordReturnFloats("kalle", 3, 0, 0);
|
20 |
|
|
|
21 |
|
|
for ( int r=0; r<3 ; r++ )
|
22 |
|
|
{
|
23 |
|
|
System::println(pointer[r]);
|
24 |
|
|
}
|
25 |
|
|
|
26 |
|
|
stringInput->resetScanWord(); //moves the pointer to the begining of the string buffer again
|
27 |
|
|
|
28 |
|
|
delete stringInput;
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
} |