pascalabcnet/InstallerSamples/!Tutorial/07_CharString/String5.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

18 lines
577 B
ObjectPascal
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Строки. Стандартные подпрограммы работы со строками
var
s: string := ' Pascal__NET ';
s1: string := 'NET';
begin
writeln('Исходная строка: ''',s,'''');
s := Trim(s);
writeln('После вызова функции Trim: ''',s,'''');
var p := Pos(s1,s);
writelnFormat('Позиция подстроки ''{0}'' в строке ''{1}'' равна {2}',s1,s,p);
Delete(s,7,2);
writeln('После удаления символов __: ',s);
Insert('ABC.',s,7);
writeln('После вставки подстроки ''ABC.'': ',s);
writeln('Первая часть строки: ',Copy(s,1,9));
writeln('Последняя часть строки: ',Copy(s,11,3));
end.