/* $DOC$
   $NAME$
      CharSub()
   $CATEGORY$
      CT3 string functions
   $ONELINER$
      Subtracts corresponding ASCII value of two strings
   $SYNTAX$
      CharSub( <[@]cString1>, <cString2>) --> cSubString
   $ARGUMENTS$
      <[@]cString1>   first string
      <cString2>      second string
   $RETURNS$
      <cSubString>    string with subtracted ASCII values
   $DESCRIPTION$
      The CharSub() function constructs a new string from the two strings
      passed as parameters. To do this, it subtracts the ASCII values of the
      corresponding characters of both strings and places a character in
      the resulting string whose ASCII value equals to that difference (modulo 256).
      If the first string is passed by reference, the resulting string is
      stored in <cString1>, too. By setting the CSetRef()-switch to .T.,
      the return value can be omitted.
      If <cString2> is shorter than <cString1> and the last character of
      <cString2> has been processed, the function restarts with the first
      character of <cString2>.
   $EXAMPLES$
      ? CharSub( "012345678", hb_BChar( 1 ) ) // --> "/01234567"
      ? CharSub( "123456789", hb_BChar( 255 ) ) // --> "23456789:"
      ? CharSub( "9999", hb_BChar( 0 ) + hb_BChar( 1 ) + hb_BChar( 2 ) + hb_BChar( 3 ) ) // --> "9876"
   $STATUS$
      Ready
   $COMPLIANCE$
      CharSub() is a new function that is only available in Harbour's CT3 lib.
   $PLATFORMS$
      All
   $FILES$
      Library is hbct.
   $SEEALSO$
      CharAdd(),  CharAnd(),  CharNot(),
      CharOr(),   CharXor(),  CharShl(),
      CharShr(),  CharRll(),  CharRlr(),
      CSetRef()
   $END$
 */

/* $DOC$
   $NAME$
      CharShl()
   $CATEGORY$
      CT3 string functions
   $ONELINER$
      Process each character in a string with bitwise SHIFT LEFT operation
   $SYNTAX$
      CharShl( <[@]cString>, <nBitsToSHL> ) --> cSHLString
   $ARGUMENTS$
      <[@]cString>    string to be processed
      <nBitsToSHL>    number of bit positions to be shifted to the left
   $RETURNS$
      <cSHLString>    string with bitwise shifted left characters
   $DESCRIPTION$
      The CharShl() function constructs a new string from the string
      passed as parameter. To do this, it performs a bitwise SHIFT LEFT
      (SHL) operation to the characters of the string and places a character in
      the resulting string whose ASCII value equals to the result of that
      operation.
      Be aware that bits shifted out of the byte are lost. If you need
      a bit rotation, use the CharRll() function instead.
      If the string is passed by reference, the resulting string is
      stored in <cString>, too. By setting the CSetRef()-switch to .T.,
      the return value can be omitted.
   $EXAMPLES$
      ? CharShl( hb_BChar(   1 ) + hb_BChar(  2 ) + hb_BChar(  4 ) + hb_BChar(   8 ) + ;
                 hb_BChar(  16 ) + hb_BChar( 32 ) + hb_BChar( 64 ) + hb_BChar( 128 ), 3 )
      // -->     hb_BChar(   8 ) + hb_BChar( 16 ) + hb_BChar( 32 ) + hb_BChar(  64 ) + ;
      //         hb_BChar( 128 ) + hb_BChar(  0 ) + hb_BChar(  0 ) + hb_BChar(   0 )
   $STATUS$
      Ready
   $COMPLIANCE$
      CharShl() is a new function that is only available in Harbour's CT3 lib.
   $PLATFORMS$
      All
   $FILES$
      Library is hbct.
   $SEEALSO$
      CharAdd(),  CharSub(),  CharAnd(),
      CharOr(),   CharXor(),  CharNot(),
      CharShr(),  CharRll(),  CharRlr(),
      CSetRef()
   $END$
 */

/* $DOC$
   $NAME$
      CharShr()
   $CATEGORY$
      CT3 string functions
   $ONELINER$
      Process each character in a string with bitwise SHIFT RIGHT operation
   $SYNTAX$
      CharShr( <[@]cString>, <nBitsToSHR> ) --> cSHRString
   $ARGUMENTS$
      <[@]cString>    string to be processed
      <nBitsToSHR>    number of bit positions to be shifted to the right
   $RETURNS$
      <cSHRString>    string with bitwise shifted right characters
   $DESCRIPTION$
      The CharShr() function constructs a new string from the string
      passed as parameter. To do this, it performs a bitwise SHIFT RIGHT
      (SHR) operation to the characters of the string and places a character in
      the resulting string whose ASCII value equals to the result of that
      operation.
      Be aware that bits shifted out of the byte are lost. If you need
      a bit rotation, use the CharRlr() function instead.
      If the string is passed by reference, the resulting string is
      stored in <cString>, too. By setting the CSetRef()-switch to .T.,
      the return value can be omitted.
   $EXAMPLES$
      ? CharShr( hb_BChar(  1 ) + hb_BChar(  2 ) + hb_BChar(  4 ) + hb_BChar(   8 ) + ;
                 hb_BChar( 16 ) + hb_BChar( 32 ) + hb_BChar( 64 ) + hb_BChar( 128 ), 3 )
      // -->     hb_BChar(  0 ) + hb_BChar(  0 ) + hb_BChar(  0 ) + hb_BChar(   1 ) + ;
      //         hb_BChar(  2 ) + hb_BChar(  4 ) + hb_BChar(  8 ) + hb_BChar(  16 )
   $STATUS$
      Ready
   $COMPLIANCE$
      CharShr() is a new function that is only available in Harbour's CT3 lib.
   $PLATFORMS$
      All
   $FILES$
      Library is hbct.
   $SEEALSO$
      CharAdd(),  CharSub(),  CharAnd(),
      CharOr(),   CharXor(),  CharNot(),
      CharShl(),  CharRll(),  CharRlr(),
      CSetRef()
   $END$
 */

/* $DOC$
   $NAME$
      CharRll()
   $CATEGORY$
      CT3 string functions
   $ONELINER$
      Process each character in a string with bitwise ROLL LEFT operation
   $SYNTAX$
      CharRll( <[@]cString>, <nBitsToRLL> ) --> cRLLString
   $ARGUMENTS$
      <[@]cString>    string to be processed
      <nBitsToRLL>    number of bit positions to be rolled to the left
   $RETURNS$
      <cRLLString>    string with bitwise rolled left characters
   $DESCRIPTION$
      The CharRll() function constructs a new string from the string
      passed as parameter. To do this, it performs a bitwise ROLL LEFT
      (RLL) operation to the characters of the string and places a character in
      the resulting string whose ASCII value equals to the result of that
      operation.
      Be aware that, in contrast to CharShl(), bits rolled out on
      the left are put in again on the right.
      If the string is passed by reference, the resulting string is
      stored in <cString>, too. By setting the CSetRef()-switch to .T.,
      the return value can be omitted.
   $EXAMPLES$
      ? CharRll( hb_BChar(   1 ) + hb_BChar(  2 ) + hb_BChar(  4 ) + hb_BChar(   8 ) + ;
                 hb_BChar(  16 ) + hb_BChar( 32 ) + hb_BChar( 64 ) + hb_BChar( 128 ), 3 )
      // -->     hb_BChar(   8 ) + hb_BChar( 16 ) + hb_BChar( 32 ) + hb_BChar(  64 ) + ;
      //         hb_BChar( 128 ) + hb_BChar(  1 ) + hb_BChar(  2 ) + hb_BChar(   4 )
   $STATUS$
      Ready
   $COMPLIANCE$
      CharRll() is a new function that is only available in Harbour's CT3 lib.
   $PLATFORMS$
      All
   $FILES$
      Library is hbct.
   $SEEALSO$
      CharAdd(),  CharSub(),  CharAnd(),
      CharOr(),   CharXor(),  CharNot(),
      CharShl(),  CharShr(),  CharRlr(),
      CSetRef()
   $END$
 */

/* $DOC$
   $NAME$
      CharRlr()
   $CATEGORY$
      CT3 string functions
   $ONELINER$
      Process each character in a string with bitwise ROLL RIGHT operation
   $SYNTAX$
      CharRlr( <[@]cString>, <nBitsToRLR> ) --> cRLRString
   $ARGUMENTS$
      <[@]cString>    string to be processed
      <nBitsToRLR>    number of bit positions to be rolled to the right
   $RETURNS$
      <cRLRString>    string with bitwise rolled right characters
   $DESCRIPTION$
      The CharRlr() function constructs a new string from the string
      passed as parameter. To do this, it performs a bitwise ROLL RIGHT
      (RLR) operation to the characters of the string and places a character in
      the resulting string whose ASCII value equals to the result of that
      operation.
      Be aware that, in contrast to CharShr(), bits rolled out on
      the right are put in again on the left.
      If the string is passed by reference, the resulting string is
      stored in <cString>, too. By setting the CSetRef()-switch to .T.,
      the return value can be omitted.
   $EXAMPLES$
      ? CharRlr( hb_BChar(  1 ) + hb_BChar(  2 ) + hb_BChar(   4 ) + hb_BChar(   8 ) + ;
                 hb_BChar( 16 ) + hb_BChar( 32 ) + hb_BChar(  64 ) + hb_BChar( 128 ), 3 )
      // -->     hb_BChar( 32 ) + hb_BChar( 64 ) + hb_BChar( 128 ) + hb_BChar(   1 ) + ;
      //         hb_BChar(  2 ) + hb_BChar(  4 ) + hb_BChar(   8 ) + hb_BChar(  16 )
   $STATUS$
      Ready
   $COMPLIANCE$
      CharRlr() is a new function that is only available in Harbour's CT3 lib.
   $PLATFORMS$
      All
   $FILES$
      Library is hbct.
   $SEEALSO$
      CharAdd(),  CharSub(),  CharAnd(),
      CharOr(),   CharXor(),  CharNot(),
      CharShl(),  CharShr(),  CharRll(),
      CSetRef()
   $END$
 */
