StringCopy- Returns a part of a string
Function that returns a part of string.
- StringCopy(S,P,L): string
- (string) S: A string from which a part is copied;
- (int) P: The location from where to start copying. Ranges from 1 to the length of the string;
- (int) L: Amount of characters to be copied from P (optional).
Use the StringCopy function to copy a part of a string. The P parameter indicates the starting position from which the characters are to be copied. The L parameter indicates how many characters to copy.
The result is a string containing L characters from the P position.
If the L parameter is omitted, only the character of the P position is copied.
// Create a string variable
S = "Biblos"
// Four-character copy from the third character
T = StringCopy(S,3,4)
// Variable T contains the string "blos".