|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
strA : String;
begin
strA := 'ABCDEF';
Console.WriteLine('strA = ' + strA);
if strA.StartsWith('ABC')
then Console.WriteLine('strA starts with ABC')
else Console.WriteLine('strA does not start with ABC');
if strA.StartsWith('abc')
then Console.WriteLine('strA starts with abc')
else Console.WriteLine('strA does not start with abc');
Console.ReadLine;
end.
|
strA = ABCDEF
strA starts with ABC
strA does not start with abc
|
|