Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to include " inside quotes?

Hello. Uh... It may look like a derp question, but, I can't figure out how to include a " inside two "" I mean, how do I do this?

print ("Im triying to include "these" into this text")

I thought of including the string into two ' ', but what if I want to include both simbols?

print ('I'm screwed up because I don't know what to "do"?')

I searched on the internet but I don't know how to express my problem in a sentence and didn't got results. Help?

3 answers

✓ Accepted answer

The best way to do this is using escape sequences. They'll always provide quotes, for sure.

print("   \"   ")  --This will print a single pair of quotation marks.
print("And what happened is, I said, \"Well what do you think?\" and then he said nothing!")
print('You can also use single quotes around " s and then concatenate as well.'
print('The value is "'..Value..'".'  

The last print would print: The value is "Value".

In conclusion, there's a metric ton of ways to getting around this, however, I still suggest the escape sequences first and foremost. Read more about it: Here.

Use [[ and ]] instead of " or '...

print([[I like this movie called "The Move"]])

3 comments

0

I think.. idk

0

I may look idiot, but what if I wanna have [ ] " and ' at the same time? xD Is there a way to include them all? Or maybe I need to plus the strings, for example?

0

For qoutes you are using [[ not [. So if you use only of [, and/or ], you will be fine.

I would do this:

print(“I’m trying to include ”.. ‘“‘.. these.. ‘“‘.. “into this text”)

2 comments

0

Yeah, that's the most logical thing. Thanks!

0

No problem

This discussion is preserved as it was. New answers, comments, and votes are closed.