xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

RangeRem()

Deletes character(s) within a specified range of characters.

Syntax

RangeRem( <xRangeStart>, ;
          <xRangeEnd>  , ;
          <cString>      ) --> cResult

Arguments

<xRangeStart> and <xRangeEnd>
These are two single characters, or their numeric ASCII codes, marking the begin and end of the range of characters to be removed from <cString>. If <xRangeStart> is larger than <xRangeEnd>, the range is defined as <xRangeStart> to 255 and 0 to <xRangeEnd>.
<cString>
This is the character string to delete a range of characters from.

Return

The function removes all characters within the specified range and returns the modified string.

Info

See also:PosRange(), RangeRepl()
Category: CT:String manipulation , Character functions
Source:ct\range.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates results of RangeRem()

   PROCEDURE Main
      LOCAL cString := "The xHarbour Compiler"

      // remove lower case characters from "o" to "z"
      ? RangeRem( "o", "z", cString ) // result: The Hab Cmile

      // remove upper case characters from "A" to "Z"
      ? RangeRem( "A", "Z", cString ) // result: he xarbour ompiler
   RETURN

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