/* $DOC$ $NAME$ AtRepl() $CATEGORY$ CT3 string functions $ONELINER$ Search and replace sequences in a string $SYNTAX$ AtRepl( , , , [], [], [] ) --> cString $ARGUMENTS$ is the substring searched for in is the processed string is the replacement for sequences found [] specifies the number of replacements Default: last occurence [] if set to .T., only the th sequence of will be replaced, else all sequences will be replaced. Default: .F. []) specifies how many characters in from the beginning should be ignored by the function Default: 0 $RETURNS$ $DESCRIPTION$ The AtRepl() function searches and replaces sequences in a string. First, the function ignores the first characters of . Then, if is set to .T., it searches for the th occurence of in . If successful, the sequence will be replaced with . If is set to .F., the same search is performed, but EVERY occurence of till the th (inclusive) will be replaced with . Note that, in this case, the replacements are performed even if the th occurence does not exist. By using the CSetAtMupa() switch you can decide whether the function restarts searching after a found sequence of after the first character of that sequence. The function allows the use of wildcards in and looks for the settings of SetAtLike(). $EXAMPLES$ ? AtRepl( "ABC", "ABCDABCDABC", "xx" ) // --> "xxDxxDxx" ? AtRepl( "ABC", "ABCDABC", "ZYXW" ) // --> "ZYXWDZYXW" ? AtRepl( "ABC", "ABCDABCDABC", "xx", 2 ) // --> "xxDxxDABC" ? AtRepl( "ABC", "ABCDABCDABC", "xx", 2, .T. ) // --> "ABCDxxDABC" $STATUS$ Ready $COMPLIANCE$ AtRepl() is compatible with CT3's AtRepl(). Note the new, 6th parameter ! $PLATFORMS$ All $FILES$ Library is hbct. $SEEALSO$ CSetAtMupa(), SetAtLike() $END$ */