Icon QuotedStr

Unit: WebCore

Available In: Client and Server Applications

function QuotedStr(const Value: String;
                   QuoteChar: Char=SINGLE_QUOTE): String

The QuotedStr function adds the specified quote character to the start and end of the input parameter. In addition, any characters in the input parameter that match the specified quote character are escaped so that they are properly interpreted as embedded quote characters. The return value is the transformed input parameter.

Examples

Y := 'Absolute';
X := QuotedStr(Y);  // X is 'Absolute'

Y := 'It''s';
X := QuotedStr(Y);  // X is 'Its''s'
Image