Unicode Intrinsic Functions - Substring Method

Return part of a string

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)Unicode StringResulting string
StartPosition*InputIntegerPosition at which to start the substring
Length*Input (Optional)IntegerNumber of characters to substring
Pad*Input (Optional)Unicode StringPad character used to replace blanks in the result

Details

Substring returns a section of the string starting at the specified StartPosition for a length of the specified Length. If this combination exceeds the available string length, Pad can be used to provide a pad character.

Example

In this example, if #String contained "ABCDE", the result would be "ABCD"
#Com_owner.Caption := #String.Substring( 1 4)
In this example, if #String contained "ABCDE", the result would be "ABCDE***"
#Com_owner.Caption := #String.Substring( 1 8 ?*?)

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2