Viva Clipper !

CharOnly()

Advertisements

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

Advertisements

Advertisements