[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ExtractWords                                                  StrngTTT



Purpose   To extract a number specified number of words from a string.

Returns   string;

Declaration    ExtractWords(S,N: byte; Str: string):string;

          S is number of the first word to extract
          N is the number of words to extract
          Str is the string to extract from

Uses StrngTTT.

Remarks   If there are insufficient words to extract, the function
          will return as many words as possible.

          If there are fewer than S words in the string, the function
          returns a null string, i.e. ''.

Example


               USES STRNGTTT;
               VAR LASTBIT : STRING;
               BEGIN
                 LASTBIT := EXTRACTWORDS(4,3,'WHO THE HELL SAYS
                 CENSORSHIP IS GOOD!');
               END.


The string LastBit is assigned the value 'Censorship is good!'.



This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson