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

Advertisements

2 responses to “WordOnly()

  1. Pingback: Harbour All Functions – W | Viva Clipper !

  2. Pingback: Harbour String Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s