lemon/bits/item_writer.h
changeset 1535 e667cd5c0886
parent 1533 43c7b3085212
child 1852 ffa7c6e96330
equal deleted inserted replaced
1:287650cb7c72 2:19a09cf84220
    54     ///
    54     ///
    55     /// Writes a quoted string to the given stream.
    55     /// Writes a quoted string to the given stream.
    56     void write(std::ostream& os, const std::string& value) {
    56     void write(std::ostream& os, const std::string& value) {
    57       os << "\"";
    57       os << "\"";
    58       if (escaped) {
    58       if (escaped) {
    59 	std::ostringstream ls(value);
    59 	std::ostringstream ls;
    60 	for (int i = 0; i < (int)value.size(); ++i) {
    60 	for (int i = 0; i < (int)value.size(); ++i) {
    61 	  writeEscape(ls, value[i]);
    61 	  writeEscape(ls, value[i]);
    62 	}
    62 	}
    63 	os << ls.str();
    63 	os << ls.str();
    64       } else {
    64       } else {