function QuotedString(const QuoteChar: Char = ''''): Substr.Substring;
The text in QuoteChar, every QuoteChar inside doubled.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | QuoteChar | Char |
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