Returns a substring of a string or a segment of a dynamic array.
Unit
System
Category
string handling routines
Delphi syntax:
function Copy(S; Index, Count: Integer): string;
function Copy(S; Index, Count: Integer): array;
Description
S is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or subarray containing Count characters or elements starting at S[Index]. The substring or subarray is a unique copy (that is, it does not share memory with S, although if the elements of the array are pointers or objects, these are not copied as well.)
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.
Note: When S is a dynamic array, you can omit the Index and Count parameters and Copy copies the entire array.
COPY : 해당 스트링값을 복사하라는 함수.
PT := COPY(PT,0,NUM) : PT라는 스트링값에서 0번째부터 NUM 번째값까지 복사를 해서 다시 PT안에 넣으라는 말입니다. ^^