| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Left justifies characters in a character string.
JustLeft( <cString>, [<xChar>] ) --> cResult
The function searches <xChar> at the beginning of <cString> and moves all <xChar> from the beginning to the end. The modified string is returned.
| See also: | Center(), JustRight() |
| Category: | CT:String manipulation , Character functions |
| Source: | ct\justify.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays results of JustLeft()
PROCEDURE Main
LOCAL cStr1 := " xHarbour"
LOCAL cStr2 := "....ABCD"
? ">"+JustLeft( cStr1 )+"<" // result: >xHarbour <
? ">"+JustLeft( cStr2, "." )+"<" // result: >ABCD....<
RETURN
http://www.xHarbour.com