Substr.QuotedStr Method

function QuotedStr(const S: Substring): Substring; overload; inline;

S in apostrophes, every apostrophe inside doubled.

#NameTypeDescription
1SSubstring

Returns: Substring

Examples

Quoting.

uses Substr;

procedure Example;
begin
    Assert(QuotedStr(Substring('it''s')) = '''it''''s''');
end;