home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / tttdem51.zip / STRNDEM1.PAS < prev    next >
Pascal/Delphi Source File  |  1989-01-31  |  2KB  |  36 lines

  1. Program StrnTTT5_Demo_1;
  2. uses CRT, FastTTT5, StrnTTT5;
  3. var
  4.     Ch : char;
  5.     DemoStr : string;
  6.  
  7. begin
  8.     Clrscr;
  9.     DemoStr := '  TechnoJock''s Turbo Toolkit string demo   ';
  10.     WriteAt(5,1,lightgray,black,'Source String: ');
  11.     WriteAt(30,1,lightcyan,black,'"'+DemoStr+'"');
  12.     WriteAt(1,4,lightgray,black,'Upper:');
  13.     WriteAt(30,4,yellow,black,'"'+Upper(DemoStr)+'"');
  14.     WriteAt(1,5,lightgray,black,'Lower:');
  15.     WriteAt(30,5,yellow,black,'"'+Lower(DemoStr)+'"');
  16.     WriteAt(1,6,lightgray,black,'Proper:');
  17.     WriteAt(30,6,yellow,black,'"'+Proper(DemoStr)+'"');
  18.     WriteAt(1,7,lightgray,black,'Total words:');
  19.     WriteAt(30,7,lightgreen,black,Int_To_Str(WordCnt(DemoStr)));
  20.     WriteAt(1,8,lightgray,black,'Posn. Word 3:');
  21.     WriteAt(30,8,lightgreen,black,Int_to_Str(PosWord(3,DemoStr)));
  22.     WriteAt(1,9,lightgray,black,'Words 2..5 are:');
  23.     WriteAt(30,9,yellow,black,'"'+ExtractWords(2,4,DemoStr)+'"');
  24.     WriteAt(1,10,lightgray,black,'Strip Leading spaces:');
  25.     WriteAt(30,10,yellow,black,'"'+Strip('L',' ',DemoStr)+'"');
  26.     WriteAt(1,11,lightgray,black,'Strip Trailing spaces:');
  27.     WriteAt(30,11,yellow,black,'"'+Strip('R',' ',DemoStr)+'"');
  28.     WriteAt(1,12,lightgray,black,'Strip Lng. & Tng. spaces:');
  29.     WriteAt(30,12,yellow,black,'"'+Strip('B',' ',DemoStr)+'"');
  30.     WriteAt(1,13,lightgray,black,'Strip All spaces:');
  31.     WriteAt(30,13,yellow,black,'"'+Strip('A',' ',DemoStr)+'"');
  32.     WriteAT(1,20,white,black,'Run DemoTTT.exe for the main demo program');
  33.     WriteAT(1,21,white,black,'TechnoJock''s Turbo Toolkit v5.0');
  34.     GotoXY(1,22);
  35. end.
  36.