WordOnly()

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()

CharRem()

CHARREM()

Removes characters from a string

Syntax

      CHARREM( <cDeleteThisCharacters>, <cString> ) -> cReducedString

Arguments

<cDeleteThisCharacters> specifies the characters that should be deleted in <cString>

<cString>) is the string that should be processed

Returns

<cReducedString> is a string where the characters specified in <cDeleteThisCharacters> are deleted

Description

The CHARREM() function deletes the characters specified in <cDeleteThisCharacters> from <cString>.

Examples

      ? CHARREM( " ", " 1  2  " )   // "12"
      ? CHARREM( "3y", "xyz123" )   // "xz12"

Tests

      CHARREM( " ", " 1  2  " ) == "12"
      CHARREM( "3y", "xyz123" ) == "xz12"

Compliance

CHARREM() is compatible with CT3’s CHARREM().

Platforms

All

Files

Source is charonly.c, library is ct3.

Seealso

CHARONLY(), WORDONLY(), WORDREM()

CharOnly()

CHARONLY()

Intersectional set of two strings based on characters

Syntax

      CHARONLY( <cThisCharactersOnly>, <cString> ) -> cReducedString

Arguments

<cThisCharactersOnly> specifies the characters that must not be deleted in <cString>. <cString> is the string that should be processed

Returns

<cReducedString> A string with all characters deleted but those specified in <cThisCharactersOnly>.

Description

The CHARONLY() function calculates the intersectional set of two strings. To do this, it deletes all characters from <cString> that do not appear in <cThisCharacterOnly>.

Examples

      ? CHARONLY( "0123456789", "0211 - 38 99 77" )  //  "0211389977"
      ? CHARONLY( "0123456789", "0211/ 389 977" )    //  "0211389977"

Tests

      CHARONLY( "0123456789", "0211 - 38 99 77" ) == "0211389977"
      CHARONLY( "0123456789", "0211/ 389 977" )   == "0211389977"

Compliance

CHARONLY() is compatible with CT3’s CHARONLY().

Platforms

All

Files

Source is charonly.c, library is ct3.

Seealso

CHARREM(), WORDONLY(), WORDREM()