[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 StrToken( cText, nCount, cSeparator )-> <cToken>
------------------------------------------------------------------------------


 PARAMETER:

  <cText>       Is the source text that contains the token to extract 

  <nCount>      Is the numeric occurrence of the token in <cText>

  <cSeparator>  Is the character that separates the tokens. By default
                it is a space (" ")


 RETURNS:

  <cToken> is the token ( substring .. ) that we want to retreive


 DESCRIPTION:

  StrToken() retreives the <nCount> occurence of a character, a word
  or a pattern separated by <cSeparator>.
  Everyone who has worked with the CA TOOLS has missed their powerful TOKEN
  Functions ever since, so that you will be glad to see that with StrToken()
  you finally have a replacement.
  
       
   EXAMPLE:


    +--------------------------------------------------------------+
    |  /* Extract third word */                                    |
    |  ? StrToken( "CREATE CLASS TOKEN", 2) -> "TOKEN"             |
    |                                                              |
    |  /* Extract the second line of a text */                     |
    |  ? StrToken( cFile, 2, CRLF ) -> "that is the question"      |
    |                                                              |
    |  /* Parse the Argument list of a function */                 |
    |   cFunc := "CallMe( cText, nSecond, lThird )"                |
    |   cArgs := StrToken(cFunc, 1, "(" )                          |
    |                                                              |
    |   cArg1 := StrToken( cFunc,1, ',' )                          |
    |                                                              |
    +--------------------------------------------------------------+


 SOURCE:

  SOURCE\WINAPI\STRTOKEN.C



See Also: StrChar StrCapFirst
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson