xHarbour Reference Documentation > Function Reference |
Replaces a specified character on the right side of a string.
ReplRight( <cString> , ; <xReplace>, ; [<xSearch>] ) --> cResult
The function replaces characters specified with <xSearch> at the end of <cString> with <xReplace> and returns the modified string.
See also: | ReplAll(), ReplRight(), StrTran() |
Category: | CT:String manipulation , Character functions |
Source: | ct\replace.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays results of ReplRight() PROCEDURE Main LOCAL cStr1 := " xHarbour " LOCAL cStr2 := "00012345,000" ? ">"+ReplRight( cStr1, "_" )+"<" // result: > xHarbour__< ? ">"+ReplRight( cStr2, "x", "0" )+"<" // result: >00012345,xxx< RETURN
http://www.xHarbour.com