Compatible Unicode Intrinsic Functions - LeftMost Method

Get the left most characters from the string

Member of Compatible Unicode Intrinsic Functions (PRIM_LIBI.ICompatibleUnicodeIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Unicode String

Resulting characters

Characters

*Input (Optional)

Integer

Number of characters to return

Pad

*Input (Optional)

Unicode String

Pad 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

  • No labels