+ 2

String

How to create a string containing double quotes between double quotes?

19th Jul 2017, 4:09 AM
Kesavadharshini Alagirisamy
5 Antworten
+ 11
use backward slash before double quotes, String str="hi \"welcome\"";
19th Jul 2017, 4:10 AM
Silambarasan T
Silambarasan T - avatar
+ 6
@david Thanks for your reply
19th Jul 2017, 4:34 AM
Silambarasan T
Silambarasan T - avatar
+ 5
@Silambarasan T If you want to be really picky about details, \ is a backslash and / is a forward slash 😎
19th Jul 2017, 4:30 AM
David Ashton
David Ashton - avatar
+ 4
To include both sets of quotes in the string you would need str="\"hi \"welcome\"\"";
19th Jul 2017, 4:33 AM
David Ashton
David Ashton - avatar
0
Print(" \"hello\" ")
20th Jan 2019, 6:00 AM
niki
niki - avatar