Copy function
Returns a substring of a string or a segment of a dynamic array.
function Copy(S; Index, Count: Integer): string;
...
If Index is larger than the length of S, Copy returns an empty string or array. If Count specifies more characters or array elements than are available, only the characters or elements from S[Index] to the end of S are returned.