Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>afteratnum()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
AFTERATNUM()

Syntax:     AFTERATNUM(<expC1>,<expC2>[,<expN1>][,<expN2>])

Arguments:  <expC1> is the string to find in the <expC2> string
            <expC2> denotes the string to search.
            <expN1> denotes the number of the appearance of <expC1>
            in <expC2> to be determined.
            <expN2> denotes the character number from which to start
            the search.

Returns:    A character string.
            The function returns the remainder of the character string
            from the first character after the search string.  A null string
is
            returned if the last character of the search sequence found is
            also the last character of the string searched.

Usage:      The function will determine the <expN1> appearance of
            <expC1> within the <expC2> string, and will return the
            remainder of the string from the first position after the
            sequence found.  The function will respect the setting of
            CSETATMUPA(), which will produce different results
            accordingly.

            AFTERNUM() will search each appearance of this string
            from the left, to determine the <expN1>th appearance of
            <expC1>.  If CSETATMUPA() is switched off, then the search
            will be continued after the last character of the sequence
            most recently found.  Otherwise, the search will be continued
            after the first character of the sequence most recently found.

Notes:      If no value is specified for <expN1>, the function will
            determine the last appearance of the sequence indicated via
            <expC1>.  This function will start searching from the first
            character of <expC2>, if the <expN2> argument has not been
            specified.  Otherwise, <expN2> characters relative to the start
            of the string will be excluded from the search.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * A string is searched in two ways after
            * "as" last occurred.
            CSETATMUPA(.T.)
            ? AFTERATNUM("aaa","aBaaBaaaX")     && "X"

            CSETATMUPA(.F.)
            ? AFTERATNUM("aaa","aBaaBaaaX")     && "aX"

            * The third appearance of "xx" within a string
            * where the first four characters are not
            * considered.  Please note the difference results
            * obtained from the multipass.

            string = "AxxBBBBxxCCCCxxxDxxEExx"

            CSETATMUPA(.T.)
            ? AFTERATNUM("xx",string,3,4)       && "DxxEExx"

            CSETATMUPA(.F.)
            ? AFTERATNUM("xx",string,3,4)       && "EExx"




See Also: CSETATMUPA()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson