[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CHARONE()
Reduces adjoining duplicate characters in a string to one character
------------------------------------------------------------------------------
Syntax
CHARONE([<cDeleteCharacters>],<cString>) --> cString
Arguments
<cDeleteCharacter> Designates the characters that have their
adjoining duplicates removed from <cString>. The default value removes
all adjoining duplicate characters.
<cString> Designates the character string that is processed.
Returns
The processed <cString> is returned.
Description
CHARONE() searches within the <cString> for repetitions of adjoining
characters. When a character is removed, all of the characters but the
first are deleted. This differs significantly from the CHARLIST()
function, where multiple occurrences of characters within the context of
the string are removed.
Note
. Without the <cDeleteCharacter> parameter, all the repeating
characters are removed. If the parameter is specified, only those
characters in <cDeleteCharacter> are removed.
Examples
. Check for double occurrences of each character in the
character string:
? CHARONE("122333a123") // "123a123"
? CHARONE("A B CCCD") // "A B CD"
. Delete multiple side-by-side blanks:
? CHARONE(" ", "A B A B") // "A B A B"
. Make the letter "o" only appear once in the character string:
? CHARONE("o", "122oooB12o") // "122oB12"
See Also:
WORDONE()
CHARLIST()
CHARREM()
CHARONLY()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson