Semicolons inside a String

T

thehuby

How do I put a semicolon inside a string (ie so I can print out a
string including ";").

I don't seem to be able to find any solution on the web, so I am
throwing it out to the experts ;)

Much Appreciated,

Rick
www.e-connected.com
 
T

thehuby

Hey - never mind! I just realised that it was something else breaking
my code.

How embarrased am i?!?!?

Rick
 
M

Mike Schilling

thehuby said:
Hey - never mind! I just realised that it was something else breaking
my code.

How embarrased am i?!?!?

Let me guess; you had a statement like

String s = "Hello;"

and the semicolon in the string made it hard to see that there was no
semicolon at the end of the statement.

Gosh, *I*'ve never done that :)
 
R

Roedy Green

How do I put a semicolon inside a string (ie so I can print out a
string including ";").

There is nothing special about semicolon. You can embed it the same
way you would the letter e.

For more awkward characters see
http://mindprod.com/jgloss/literals.html

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top