Substring.QuotedString Method

function QuotedString(const QuoteChar: Char = ''''): Substr.Substring;

The text in QuoteChar, every QuoteChar inside doubled.

#NameTypeDescription
1QuoteCharChar

Returns: Substring

Examples

Quoting with an apostrophe and with a double quote.

uses Substr;

procedure Example;
begin
    Assert(Substring('it''s').QuotedString = '''it''''s''');
    Assert(Substring('a"b').QuotedString('"') = '"a""b"');
end;
See Also: Substr.QuotedStr