How do I put a ' (apostrophe) inside a string of text?
Kmclane
Posts: 33
I can't believe I have never run into this before, but how do you create a string of text that has an apostrophe within the string?
I am trying to send text (using constants to store the text) to an LED readerboard and think I remember there being a special character sequence that allows that.
I am trying to send text (using constants to store the text) to an LED readerboard and think I remember there being a special character sequence that allows that.
0
Comments
You can't.
Just kidding. Its its own escape character, similar to back slashes in other languages. Type the apostrophe twice to make it nice.
Paul
Digging feverishly through all of my old manuals and guides and couldn't (or should I say ouldn''t) find anything.
I suspected that was the solution, but then thought it would interpret as two text segments, right next to each other. Don't know why I just didn't compile and test.
Ha! I did this same thing too up until about 3 years ago. I still run into old code where I found I did this.
I haven't seen the escape characters documented anywhere, so we are left to our own devices. I'm sure this stumps everyone the first time.
Paul
I do the double apostrophe as well.