UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 03 Feb 2012 05:16 PM |
| How can I put just a 'Quotation Mark' in a string? |
|
|
| Report Abuse |
|
|
POC0bob
|
  |
| Joined: 20 Feb 2010 |
| Total Posts: 549 |
|
|
| 03 Feb 2012 05:21 PM |
| 'And the dog said "WOOF" :D' |
|
|
| Report Abuse |
|
|
POC0bob
|
  |
| Joined: 20 Feb 2010 |
| Total Posts: 549 |
|
|
| 03 Feb 2012 05:22 PM |
| or "and the dog said 'WOOF' " |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 03 Feb 2012 05:23 PM |
Put in a break character (\). It ignores all effects of code behind it.
So, for example, local string = "He said \"this is how you use the special code.\"" print(string)
Would print
He said "this is how you use the special code." |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 03 Feb 2012 05:24 PM |
Why does it remove the backslash when I put it in brackets?
Whatever, the break code is the backslash \, so put that in there and it will ignore the effect of the code behind it. |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 05:24 PM |
Or simply add two 's
'' = " .. almost.. xD
Use the above method, by L2000. Should perhaps work. |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 05:54 PM |
> Or simply add two 's '' = " .. almost.. xD
Fail... |
|
|
| Report Abuse |
|
|