xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

JustLeft()

Left justifies characters in a character string.

Syntax

JustLeft( <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 beginning of <cString>. It defaults to a blank space (Chr(32)).

Return

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

Info

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

Example

// The example displays results of JustLeft()

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

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

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

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