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

Contents of /api/Classes/Examples/String/StringTest6.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Sun Jul 1 20:47:58 2001 UTC (23 years ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
First import

1 #include "../../String/String.h"
2 #include "../../String/StringInput.h"
3 #include "../../System/System.h"
4 #include "StringTest6.h"
5 #include "../../System/SystemDefine.h"
6
7 StringTest6::StringTest6(){}
8 StringTest6::~StringTest6(){}
9
10 void StringTest6::run()
11 {
12 StringInput *stringInput=new StringInput();
13
14 stringInput->readFile("data/cut.txt");
15
16 // stringInput->dontDefragMemory(1000); // select this if you want to have intern word buffer == less malloc, free
17
18 String target="path://";
19
20 String result=stringInput->cutTheBackMergeStrings("file",target.buffer);
21
22 System::println(result.buffer);
23
24 delete stringInput;
25
26 /*
27 string->resetSourceBuffer();
28
29 unsigned char* endTarget=(unsigned char*)"per";
30 unsigned char* endTarget2=(unsigned char*)"morsan";
31
32 int *endTargetPointers=string->getEndTargetPointers();
33 endTargetPointers[0]=(int)endTarget;
34 endTargetPointers[1]=(int)endTarget2;
35 endTargetPointers[2]=0;
36
37 temp=string->findWord((unsigned char*)"per");
38
39 if ( temp == (unsigned char*)-1 )
40 {
41 cout << "stop" << endl;
42 }
43 else
44 {
45 if ( temp != 0 )
46 {
47 cout << temp << endl;
48 // free(temp);
49 }
50 }
51 */
52
53
54
55 }

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26