WordOne()

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

Advertisements

2 responses to “WordOne()

  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