String Intrinsic Functions - LeftMost Method

Get the left most characters from the string

Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)


Name Type Data Type Description
Result *Result (Optional) String Resulting characters
Characters *Input (Optional) Integer Number of characters to return
Pad *Input (Optional) String Pad character used to replace blanks in the result


LeftMost returns the first n characters of a string. If the string does not have enough characters, the remaining space can be padded.


In this example, if #String contained ABCDEFGHIJKLMNOPQRSTUVWXYZ, the result would be ABCDEFGHIJKLM
#Com_owner.Caption := #String.LeftMost( 13 )
In this example, if #String contained ABCDEFGHI the result would be ABCDEFGHI****
#Com_owner.Caption := #String.LeftMost( 13 "*" )

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020