This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

18 lines
761 B
ObjectPascal
Raw Permalink 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.