home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / visionix / test / tstrs.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-11-27  |  1.6 KB  |  91 lines

  1. program tstrs;
  2.  
  3. uses
  4.  
  5.   vstringu;
  6.  
  7. Var
  8.  
  9.   S : STRING;
  10.  
  11. begin
  12.  
  13.  
  14.   writeln( '"',
  15.            GetWords( 'Now is the time for all good men', 8 ),
  16.            '"' );
  17.  
  18.  
  19.   writeln( '"',
  20.            GetWords( 'men', 8 ),
  21.            '"' );
  22.  
  23.  
  24.   writeln( '"',
  25.            GetWords( '', 8 ),
  26.            '"' );
  27.  
  28.  
  29.   writeln( '"',
  30.            GetWords( '   Hey Dude!    ', 1 ),
  31.            '"' );
  32.  
  33.  
  34.   writeln( '"',
  35.            GetWords( '           ', 8 ),
  36.            '"' );
  37.  
  38.   writeln( '"',
  39.            GetQuote( 'Now is "the time" for all good men' ),
  40.            '"' );
  41.  
  42.  
  43.   S := 'Now is "the time" for all good men.';
  44.  
  45.   writeln( '"',
  46.            TakeQuote( S ),
  47.            '" (',S,')' );
  48.  
  49.  
  50.  
  51.   S := 'Now is the time for all good men.';
  52.  
  53.   writeln( '"',
  54.            TakeQuote( S ),
  55.            '" (',S,')' );
  56.  
  57.  
  58.   S := '    ';
  59.  
  60.   writeln( '"',
  61.            TakeQuote( S ),
  62.            '" (',S,')' );
  63.  
  64.                         {1234567890123456789012345678901234567890}
  65.   WriteLn(  PosWord( 2, 'Now is the time for all good men ' ) );
  66.  
  67.                         {         1         2         3          }
  68.                         {1234567890123456789012345678901234567890}
  69.   WriteLn(  PosWord( 8, 'Now is the time for all good men' ) );
  70.  
  71.   WriteLn(  PosWord( 9, 'Now is the time for all good men' ) );
  72.  
  73.   WriteLn(  PosWord( 2, '    ' ) );
  74.  
  75.  
  76.  
  77.   WriteLn;
  78.  
  79.   WriteLn( CountWords( 'Now is the time for all good men' ) );
  80.  
  81.   WriteLn( CountWords( 'Now' ) );
  82.  
  83.   WriteLn( CountWords( ''    ) );
  84.  
  85.   WriteLn( CountWords( 'Now   is   the    time   for  all  good  men ' ) );
  86.  
  87.  
  88.  
  89.  
  90.  
  91. end.