WORDONE()
Reduce multiple occurences of a double character to one
- Syntax
-
- WORDONE ([<cDoubleCharactersToReduce>,] <cString>) -> cReducedString
- Arguments
-
- [<cDoubleCharactersToReduce>] specifies the double characters the multiple occurences of which should be reduced to one Default: All characters. <cString> specifies the processed string
- Returns
-
- <cReducedString> the string with the reduced occurences
- Description
-
- The WORDONE() function reduces multiple occurences of double characters in <cString> to a single one. It is important to note that the multiple occurences must occur directly one behind the other.
Examples
? WORDONE("12ABAB12") // "12AB12"
? WORDONE("1AAAA2") // "1AAAA2"
? WORDONE("12", "1212ABAB") // "12ABAB"
Tests
WORDONE("12ABAB12") == "12AB12"
WORDONE("1AAAA2") == "1AAAA2"
WORDONE("12", "1212ABAB") == "12ABAB"
- Status
- Ready
- Compliance
-
- WORDONE() is compatible with CT3's WORDONE().
- Platforms
-
- All
- Files
-
- Source is charone.c, library is ct3.
- See Also