String Intrinsic Functions - LeftMost Method

Get the left most characters from the string

Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)StringResulting characters
Characters*Input (Optional)IntegerNumber of characters to return
Pad*Input (Optional)StringPad character used to replace blanks in the result

Details

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

Example

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

Febuary 18 V14SP2