Using quote inside strings in Delphi

Arthur picture Arthur · Feb 25, 2009 · Viewed 53.4k times · Source

Possible Duplicate:
How does one escape characters in Delphi string

In Delphi a string is contained within a pair of ' but I need to use ' in my string... and when I use one it brings a end to the entire string identification.

'inside string ' but this bit is outside' inside again' and the end

Is there some symbol that removes the coding affect of the next character?

Answer

The_Fox picture The_Fox · Feb 25, 2009

You need another quote to escape a quote:

Writeln('I''m in your head'); //prints: I'm in your head
Writeln(''''); //prints: '

See also this question.