/* $DOC$ $NAME$ WordRepl() $CATEGORY$ CT3 string functions $ONELINER$ Replacement of double characters $SYNTAX$ WordRepl( , <[@]cString>, , [] ) -> cString $ARGUMENTS$ is a string of double characters that should be replaced <[@]cString> is the processed string is a string of double characters that replace the one of [] sets the replacement method (see description) Default: .F. $RETURNS$ cString the processed string $DESCRIPTION$ The WordRepl() takes the double characters of one after the other and searches for them in . For set to .F., this search is successful, if the double character sequence in starts at an odd position or at any position, if is set to .T. If this happens, the double character sequence will be replaced with the corresponding double character sequence of . If is shorter than the last double sequence of is used for the "rest" of . Note that the last double character sequence in "AABBC" is "BB" in this context !! After the replacement the function restarts the search in BEHIND the replacement if the CSetAtMupa() switch is turned off, or BEHIND the first character of the replacement if the switch is turned on. (see examples for this !) One can omit the return value of this function by setting the CSetRef() to .T., but one must then pass by reference to get a result. $EXAMPLES$ ? WordRepl( "CC", "AABBCCDDEE", "XX" ) // "AABBXXDDEE" ? WordRepl( "aa", "1aaaa", "ba" ) // "1abaa" ? WordRepl( "aa", "1aaaa", "ba", .T. ) // "1baba" CSetAtMupa( .T. ) ? WordRepl( "aa", "1aaaa", "ba" ) // "1abaa" ? WordRepl( "aa", "1aaaa", "ba", .T. ) // "1bbba" $STATUS$ Ready $COMPLIANCE$ WordRepl() is compatible with CT3's WordRepl(). $PLATFORMS$ All $FILES$ Library is hbct. $SEEALSO$ CharRepl(), RangeRepl(), PosRepl(), CSetRef(), CSetAtMupa() $END$ */