Hi everyone, if I have to use in a string assignement the " character?
es. String1= "The man said "HELLO""
How could I do?
Thanks
" character in strings
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: " character in strings
Use the backslash (\) to 'escape' the double quotes (")
Your example would become "The man said \"Hello\"".
Your example would become "The man said \"Hello\"".
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis