Unit 'pascodegen' Package
[Overview][Constants][Types][Classes][Index] [#fcl]

TPascalCodeGenerator.MakePascalString

Convert string to Pascal string literal

Declaration

Source position: pascodegen.pp line 89

public function TPascalCodeGenerator.MakePascalString(

  const S: string;

  AddQuotes: Boolean = False

):string;

Arguments

S

  

Input string to convert

AddQuotes

  

Whether to add surrounding quotes

Function result

Pascal string literal

Description

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.


Documentation generated on: Dec 19 2025