xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

RemRight()

Deletes a specified character from the right side of a string.

Syntax

RemRight( <cString>, [<xChar>] ) --> cResult

Arguments

<cString>
This is the character string to delete characters from on the right side.
<xChar>
A single character or its numeric ASCII code can be passed. The default value is a space character (Chr(32)).

Return

The function removes <xChar> on the right side of <cString> and returns the modified string. If no character is specified for <xChar> the result is the same as RTrim().

Info

See also:RangeRem(), RemAll(), RemRight()
Category: CT:String manipulation , Character functions
Source:ct\remove.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays results of RemRight()

   PROCEDURE Main
      LOCAL cStr1 := "  xHarbour  "
      LOCAL cStr2 := "00012345,000"

      ? ">"+RemRight( cStr1 )+"<"        // result: >  xHarbour<

      ? ">"+RemRight( cStr2, "0" )+"<"   // result: >00012345,<
   RETURN

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