TOKENLOWER()

Change the first letter of tokens to lower case

Syntax

TOKENLOWER (<[@]cString>, [<cTokenizer>], [<nTokenCount>],
[<nSkipWidth>]) -> cString

Arguments

<[@]cString> is the processed string [<cTokenizer>] is a list of characters separating the tokens in <cString> Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ chr(32)+chr(32)+chr(138)+chr(141)+ ",.;:!\?/\\<>()#&%+-*" [<nTokenCount>] specifies the number of tokens that should be processed Default: all tokens [<nSkipWidth>] specifies the maximum number of successive tokenizing characters that are combined as ONE token stop, e.g. specifying 1 can yield to empty token Default: 0, any number of successive tokenizing characters are combined as ONE token stop

Returns

<cString> the string with the lowercased tokens

Description

The TOKENLOWER() function changes the first letter of tokens in <cString> to lower case. To do this, it uses the same tokenizing mechanism as the token() function. If TOKENLOWER() extracts a token that starts with a letter, this letter will be changed to lower case. You can omit the return value of this function by setting the CSETREF() switch to .T., but you must then pass <cString> by reference to get the result.
Examples
      ? tokenlower("Hello, World, here I am!")       // "hello, world, here i am!"
      ? tokenlower("Hello, World, here I am!",,3)    // "hello, world, here I am!"
      ? tokenlower("Hello, World, here I am!",",",3) // "hello, World, here I am!"
      ? tokenlower("Hello, World, here I am!"," W")  // "hello, World, here i am!"
Tests
      tokenlower("Hello, World, here I am!") == "hello, world, here i am!"
      tokenlower("Hello, World, here I am!",,3)    == "hello, world, here I am!"
      tokenlower("Hello, World, here I am!",",",3) == "hello, World, here I am!"
      tokenlower("Hello, World, here I am!"," W")  == "hello, World, here i am!"
Status

Ready

Compliance

TOKENLOWER() is compatible with CT3's TOKENLOWER(), but a new 4th parameter, <nSkipWidth> has been added for synchronization with the the other token functions.

Platforms

All

Files

Source is token1.c, library is libct.

See Also