Convert string to Pascal string literal
Source position: pascodegen.pp line 89
public function TPascalCodeGenerator.MakePascalString( |
const S: string; |
AddQuotes: Boolean = False |
):string; |
S |
|
Input string to convert |
AddQuotes |
|
Whether to add surrounding quotes |
Pascal string literal
MakePascalString converts a string to a proper Pascal string literal by escaping single quotes. All single quotes in the input string are doubled to create valid Pascal string syntax. Optionally, the result can be wrapped in quotes.