[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
NAME: Copy
USE: Function to return a portion of a string. Copy takes 3 values,
a string, a starting point, and the number of characters to copy.
If the Starting point is greater then the string length then
Copy will return an empty string.
DEPENDENCY: None
SYNTAX: Copy(StringVar, Start, NumCharacters);
Copy(String, Integer, Integer);
RESULT: String
EXAMPLE: Program TestCopy;
Var
StringVar : String;
SubStringA : String[10];
SubStringB : String[5];
Begin
StringVar := 'This is a complete string';
SubStringAA := Copy(StringVar,1,7);
SubStringB := Copy(SubStringA,6,2);
Writeln(StringVar);
Writeln(SubStringA);
Writeln(SubStringB);
end.
See Also:
ConCat
Delete
Insert
Length
Pos
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson