home *** CD-ROM | disk | FTP | other *** search
- Program StrnTTT5_Demo_1;
- uses CRT, FastTTT5, StrnTTT5;
- var
- Ch : char;
- DemoStr : string;
-
- begin
- Clrscr;
- DemoStr := ' TechnoJock''s Turbo Toolkit string demo ';
- WriteAt(5,1,lightgray,black,'Source String: ');
- WriteAt(30,1,lightcyan,black,'"'+DemoStr+'"');
- WriteAt(1,4,lightgray,black,'Upper:');
- WriteAt(30,4,yellow,black,'"'+Upper(DemoStr)+'"');
- WriteAt(1,5,lightgray,black,'Lower:');
- WriteAt(30,5,yellow,black,'"'+Lower(DemoStr)+'"');
- WriteAt(1,6,lightgray,black,'Proper:');
- WriteAt(30,6,yellow,black,'"'+Proper(DemoStr)+'"');
- WriteAt(1,7,lightgray,black,'Total words:');
- WriteAt(30,7,lightgreen,black,Int_To_Str(WordCnt(DemoStr)));
- WriteAt(1,8,lightgray,black,'Posn. Word 3:');
- WriteAt(30,8,lightgreen,black,Int_to_Str(PosWord(3,DemoStr)));
- WriteAt(1,9,lightgray,black,'Words 2..5 are:');
- WriteAt(30,9,yellow,black,'"'+ExtractWords(2,4,DemoStr)+'"');
- WriteAt(1,10,lightgray,black,'Strip Leading spaces:');
- WriteAt(30,10,yellow,black,'"'+Strip('L',' ',DemoStr)+'"');
- WriteAt(1,11,lightgray,black,'Strip Trailing spaces:');
- WriteAt(30,11,yellow,black,'"'+Strip('R',' ',DemoStr)+'"');
- WriteAt(1,12,lightgray,black,'Strip Lng. & Tng. spaces:');
- WriteAt(30,12,yellow,black,'"'+Strip('B',' ',DemoStr)+'"');
- WriteAt(1,13,lightgray,black,'Strip All spaces:');
- WriteAt(30,13,yellow,black,'"'+Strip('A',' ',DemoStr)+'"');
- WriteAT(1,20,white,black,'Run DemoTTT.exe for the main demo program');
- WriteAT(1,21,white,black,'TechnoJock''s Turbo Toolkit v5.0');
- GotoXY(1,22);
- end.