/* $DOC$ $NAME$ AfterAtNum() $CATEGORY$ CT3 string functions $ONELINER$ Returns string portion after nth occurence of substring $SYNTAX$ AfterAtNum( , , [], [] ) --> cRestString $ARGUMENTS$ is the substring scanned for is the scanned string [] determines how many occurences are of in are searched Default: search last occurence [] determines how many character from the start should be ignored in the search Default: 0 $RETURNS$ the portion of after the th occurence of in If such a rest does not exist, an empty string is returned. $DESCRIPTION$ This function scans for . After the th match (or the last one, depending on the value of ) has been found, the portion of after that match will be returned. If there aren't enough matches or the last match is identical to the end of , an empty string will be returned. After a match has been found, the function continues to scan after that match if the CSetAtMupa() switch is turned off, with the second character of the matched substring otherwise. The function will also consider the settings of SetAtLike(). $EXAMPLES$ ? AfterAtNum( "!", "What is the answer ? 4 ! 5 !" ) // -> "" ? AfterAtNum( "!", "What is the answer ? 4 ! 5 ?" ) // -> " 5 ?" $STATUS$ Ready $COMPLIANCE$ AfterAtNum() is compatible with CT3's AfterAtNum(). $PLATFORMS$ All $FILES$ Library is hbct. $SEEALSO$ AtNum(), BeforAtNum(), CSetAtMupa(), SetAtLike() $END$ */ /* $DOC$ $NAME$ BeforAtNum() $CATEGORY$ CT3 string functions $ONELINER$ Returns string portion before nth occurence of substring $SYNTAX$ BeforAtNum( , , [], [] ) --> cRestString $ARGUMENTS$ is the substring scanned for is the scanned string [] determines how many occurences are of in are searched Default: search last occurence [] determines how many character from the start should be ignored in the search Default: 0 $RETURNS$ the portion of before the th occurence of in If such a string does not exist, an empty string is returned. $DESCRIPTION$ This function scans for . After the th match (or the last one, depending on the value of ) has been found, the portion of before that match will be returned. If there aren't enough matches or the last match is identical to the start of (i.e. the last match is the first match), an empty string will be returned. After a match has been found, the function continues to scan after that match if the CSetAtMupa() switch is turned off, with the second character of the matched substring otherwise. The function will also consider the settings of SetAtLike(). $EXAMPLES$ ? BeforAtNum( "!", "What is the answer ? 4 ! 5 !" ) // -> "What is the answer ? 4 ! 5 " ? BeforAtNum( "!", "What is the answer ? 4 ! 5 ?" ) // -> "What is the answer ? 4 " $STATUS$ Ready $COMPLIANCE$ BeforAtNum() is compatible with CT3's BeforAtNum(). $PLATFORMS$ All $FILES$ Library is hbct. $SEEALSO$ AtNum(), AfterAtNum(), CSetAtMupa(), SetAtLike() $END$ */ /* $DOC$ $NAME$ AtNum() $CATEGORY$ CT3 string functions $ONELINER$ Returns the start position of the nth occurence of a substring in a string $SYNTAX$ AtNum( , , [], [] ) --> nPosition $ARGUMENTS$ is the substring scanned for is the scanned string [] determines how many occurences are of in are searched Default: search last occurence [] determines how many character from the start should be ignored in the search Default: 0 $RETURNS$ the position of the th occurence of in . If such an occurence does not exist, 0 is returned. $DESCRIPTION$ This function scans for . After the th match (or the last one, depending on the value of ) has been found, the position of that match will be returned. If there aren't enough matches or there is no last match, 0 will be returned. After a match has been found, the function continues to scan after that match if the CSetAtMupa() switch is turned off, with the second character of the matched substring otherwise. The function will also consider the settings of SetAtLike(). $EXAMPLES$ ? AtNum( "!", "What is the answer ? 4 ! 5 !" ) // -> 28 ? AtNum( "!", "What is the answer ? 4 ! 5 ?" ) // -> 24 $STATUS$ Ready $COMPLIANCE$ AtNum() is compatible with CT3's AtNum(). $PLATFORMS$ All $FILES$ Library is hbct. $SEEALSO$ AtNum(), AfterAtNum(), CSetAtMupa(), SetAtLike() $END$ */