xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Strdel()

Deletes characters from a string based on a mask string.

Syntax

StrDel( <cString>, <Mask> ) --> cNewString

Arguments

<cString>
This is acharacter string where characters are deleted.
<cMask>
This is the mask charater string. Characters different from a blank space space indicate that the character at the same position in <cString> are removed.

Return

The function removes the characters from <cString> according to <cMask> and returns the resulting string.

Info

See also:StrTran(), SubStr()
Category: Character functions , xHarbour extensions
Source:rtl\strdel.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates return values of StrDel().

   PROCEDURE Main
      LOCAL cString := "Hello World"

      ? StrDel( cString, "xx  xx " )      // result: llWorld
      ? StrDel( cString, "  xx  xx " )    // result: Heo rld

      ? StrDel( cString, "x x x x x x" )  // result: el ol
      ? StrDel( cString, " x x x x x x" ) // result: HloWrd
   RETURN

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