Unicode Intrinsic Functions - LeftMost Method

Get the left most characters from the string

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)Unicode StringResulting characters
Characters*Input (Optional)IntegerNumber of characters to return
Pad*Input (Optional)Unicode 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

LANSA Version 15, April 2020