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"
Compliance
WordOne() is compatible with CT3’s WordOne().
Platforms
All
Files
Source is charone.c, library is ct3.
Seealso
CHARONE(), CHARREM()
Pingback: Harbour All Functions – W | Viva Clipper !
Pingback: Harbour String Functions | Viva Clipper !