<p>Delphi strings use single quotes, for example '<code>a valid string</code>'. How does one specify the <code>'</code> character within a literal string? How would one refer to the null byte (Unicode code point <code>U+0000</code>)? </p>

To add a single quote to a string, you include two
```
'
```
marks e.g.
```
```
str := '''test string''';
Writeln(str)
```
```
In the string above, you have the normal single quotation to start a string and then two for the single quote. Same goes for the end of the string.
You can also use
```
#
```
followed by a number for other escape character e.g.
For a new line:
```
```
str := 'Newline' + #13 + #10
```
```
or just
```
```
str := 'Newline'#13#10
```
```
Of course, using the platform-dependent constant for newline is better.