equal
deleted
inserted
replaced
16 |
16 |
17 def append_string(str: String, result: StringBuilder) = { |
17 def append_string(str: String, result: StringBuilder) = { |
18 result.append("\"") |
18 result.append("\"") |
19 for (c <- str) { |
19 for (c <- str) { |
20 if (c < 32 || c == '\\' || c == '\"') { |
20 if (c < 32 || c == '\\' || c == '\"') { |
|
21 result.append("\\") |
21 if (c < 10) result.append('0') |
22 if (c < 10) result.append('0') |
22 if (c < 100) result.append('0') |
23 if (c < 100) result.append('0') |
23 result.append(c.asInstanceOf[Int].toString) |
24 result.append(c.asInstanceOf[Int].toString) |
24 } |
25 } |
25 else result.append(c) |
26 else result.append(c) |