WordOnly()
Intersectional set of two strings based on double characters
Syntax
WordOnly( <cThisDoubleCharactersOnly>, <cString> ) -> cReducedString
Arguments
<cThisDoubleCharactersOnly> specifies the double characters that must not be deleted in <cString>.
<cString> is the string that should be processed
Returns
<cReducedString> A string with all double characters deleted but those specified in <cThisCharactersOnly>.
Description
The WordOnly() function calculates the intersectional set of two strings based on double characters. To do this, it deletes all double characters from <cString> that do not appear in <cThisDoubleCharacterOnly>.
Examples
? WordOnly( "AABBCCDD", "XXAAYYBBZZ" ) // "AABB" ? WordOnly( "AABBCCDD", "XAAYYYBBZZ" ) // "BB"
Tests
WordOnly( "AABBCCDD", "XXAAYYBBZZ" ) == "AABB" WordOnly( "AABBCCDD", "XAAYYYBBZZ" ) == "BB"
Compliance
WordOnly() is compatible with CT3’s WordOnly().
Platforms
All
Files
Source is charonly.c, library is ct3.
Seealso
CHARONLY(), CHARREM(), WORDREM()