Autor Beitrag
CASS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 160

WIN XP
D7 Enterprise
BeitragVerfasst: Mo 13.12.04 17:04 
Wie kann ich in einen String (soll später in eine Datei geschrieben werden" ein ' Zeichen einfügen?

Weil Delphi erkennt ja ' immer als String anfang bzw. Ende.
wenn aber der string so aussehen soll:
Hallo 'wie geht´s dir?'?
So gehts ja nicht oder:
string := 'hallo 'wie geht´s dir?''

Ich muss nämlich einen JavaScript String in eine Textdatei schreiben, und dabei muss ich dieses Zeichen Ausgeben.

Merci schon mal für die Hilfe.


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Di 14.12.2004 um 23:21
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mo 13.12.04 17:09 
ausblenden Delphi-Quelltext
1:
s := 'test''asd'+'wetr'+'''';					

= test'asdwetr'
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mo 13.12.04 17:15 
Oder alternativ mit dem ASCII-Zeichen (#39)

AXMD