String Intrinsic Functions - Substring Method
Return part of a string
Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)
Name |
Type |
Data Type |
Description |
Result |
*Result (Optional) |
String |
Resulting string |
StartPosition |
*Input |
Integer |
Position at which to start the substring |
Length |
*Input (Optional) |
Integer |
Number of characters to substring |
Pad |
*Input (Optional) |
String |
Pad character used to replace blanks in the result |
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.
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 ?*?)
All Component Classes
Technical Reference