Worked on code for difference transmission
This commit is contained in:
@@ -36,13 +36,13 @@ bool is_identifier(const std::string &str) {
|
||||
}
|
||||
|
||||
void quote_string(const std::string &s, std::ostream *os) {
|
||||
bool usesinglequote = false;
|
||||
bool anysq = false;
|
||||
bool anydq = false;
|
||||
for (char c : s) {
|
||||
if (c == '"') {
|
||||
usesinglequote = true;
|
||||
break;
|
||||
}
|
||||
if (c == '\'') anysq = true;
|
||||
if (c == '"') anydq = true;
|
||||
}
|
||||
bool usesinglequote = (!anysq)||(anydq);
|
||||
(*os) << (usesinglequote ? '\'' : '"');
|
||||
for (char c : s) {
|
||||
if (c >= 32) {
|
||||
|
||||
Reference in New Issue
Block a user