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>charone()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CHARONE()

Syntax:     CHARONE([<expC1>],<expC2>)

Arguments:  <expC1> contains the characters to remove from <expC2>.
            <expC2> is the string to be processed.

Returns:    A character string.
            The processed <expC2> string.

Usage:      CHARONE() will search for repeating characters next to each
            other within the <expC2> string.  All characters that repeat
            are removed.  This function differs  from CHARLIST() where
            characters appearing several times based on the whole string
            are removed.  This function can be useful for indexing where
            the operator is not sure names are spelled with one letter
            or double letters.  (Note: If used for indexing, then it will need
            to be padded to the desired key size or it will be a single
            byte index key length, as index key lengths are calculated on
            blank records.)

Notes:      If no argument <expC1> is passed, then repetitions for all
            characters will be removed.

Library:    CT1.LIB


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

Examples:   * Checking the double appearance of each of
            * the characters in the string.
            ? CHARONE("122333a123")             && "123a123"
            ? CHARONE("A     B   CCCD")         && "A B CD"

            * Only spaces should be changed.
            ? CHARONE(" ","A  B  A  B")         && "A B  A B"

            * The letter "o" should only appear as a
            * single in the string.
            ? CHARONE("o","122oooB12o")         && "122oB12"



See Also: CHARLIST() CHARONLY() CHARREM()

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