xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

JustRight()

Right justifies characters in a character string.

Syntax

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

Arguments

<cString>
This is the string to process.
<xChar>
This is a single character or its numeric ASCII code that is searched at the end of <cString>. It defaults to a blank space (Chr(32)).

Return

The function searches <xChar> at the end of <cString> and moves all <xChar> from the end to the beginning. The modified string is returned.

Info

See also:Center(), JustLeft()
Category: CT:String manipulation , Character functions
Source:ct\justify.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays results of JustRight()

   PROCEDURE Main
      LOCAL cStr1 := "xHarbour   "
      LOCAL cStr2 := "ABCD...."

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

      ? ">"+JustRight( cStr2, "." )+"<"  // result: >....ABCD<
   RETURN

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