|
@@ -93,6 +93,7 @@ procedure teststrpcopy;
|
|
|
failed;
|
|
|
end;
|
|
|
|
|
|
+
|
|
|
procedure teststrend;
|
|
|
Const
|
|
|
P : PChar = 'This is a PCHAR string.';
|
|
@@ -101,6 +102,7 @@ procedure teststrend;
|
|
|
failed;
|
|
|
end;
|
|
|
|
|
|
+
|
|
|
procedure teststrcopy;
|
|
|
Const
|
|
|
P1 : PChar = 'This a test string 012345678901234567890123456789012345678901234567890123456789';
|
|
@@ -118,6 +120,19 @@ procedure teststrcopy;
|
|
|
failed;
|
|
|
end;
|
|
|
|
|
|
+
|
|
|
+procedure teststrscanstrrscan;
|
|
|
+ Const
|
|
|
+ P : PChar = 'This is a PCHAR string.';
|
|
|
+ S : Char = 's' ;
|
|
|
+begin
|
|
|
+ if StrComp(StrScan(P,s),'s is a PCHAR string.')<>0 then
|
|
|
+ failed;
|
|
|
+ if StrComp(StrRScan(P,s),'string.')<>0 then
|
|
|
+ failed;
|
|
|
+end;
|
|
|
+
|
|
|
+
|
|
|
begin
|
|
|
write('Testing strlen ... ');
|
|
|
teststrlen;
|
|
@@ -140,4 +155,7 @@ begin
|
|
|
write('Testing strend ... ');
|
|
|
teststrend;
|
|
|
writeln('Success.');
|
|
|
+ write('Testing strscan/strrscan ... ');
|
|
|
+ teststrscanstrrscan;
|
|
|
+ writeln('Success.');
|
|
|
end.
|