xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

WordOne()

Removes duplicate adjacent words (2-byte sequences) from a string.

Syntax

WordOne( <cWordList>, <cString> ) --> cResult

Arguments

<cWordList>
This is a character string holding 2-byte sequences (words) to search for in <cString>.
<cString>
This is the character string to process.

Return

The function searches for duplicate adjacent 2-byte sequences (words) in <cString> and removes them in the result string.

Info

See also:CharOne(), I2Bin()
Category: CT:String manipulation , Character functions
Source:ct\charone.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays results of WordOne()

   PROCEDURE Main
      LOCAL cString := "abab12cd1212cdefef"

      ? WordOne( "12"  , cString )   // result: abab12cd12cdefef

      ? WordOne( "abef", cString )   // result: ab12cd1212cdef

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe