35 | | if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) || |
36 | | (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF)) |
37 | | result += *b; |
38 | | else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b'); |
39 | | else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f'); |
40 | | else if (*b == Ch('\n')) result += Ch('\\'), result += Ch('n'); |
41 | | else if (*b == Ch('\r')) result += Ch('\\'), result += Ch('r'); |
42 | | else if (*b == Ch('\t')) result += Ch('\\'), result += Ch('t'); |
43 | | else if (*b == Ch('/')) result += Ch('\\'), result += Ch('/'); |
44 | | else if (*b == Ch('"')) result += Ch('\\'), result += Ch('"'); |
45 | | else if (*b == Ch('\\')) result += Ch('\\'), result += Ch('\\'); |
| 35 | typename std::basic_string<Ch>::traits_type::int_type bDref = *b; |
| 36 | if (bDref == 0x20 || bDref == 0x21 || (bDref >= 0x23 && bDref <= 0x2E) || |
| 37 | (bDref >= 0x30 && bDref <= 0x5B) || (bDref >= 0x5D && bDref <= 0xFF)) |
| 38 | result += bDref; |
| 39 | else if (bDref == Ch('\b')) result += Ch('\\'), result += Ch('b'); |
| 40 | else if (bDref == Ch('\f')) result += Ch('\\'), result += Ch('f'); |
| 41 | else if (bDref == Ch('\n')) result += Ch('\\'), result += Ch('n'); |
| 42 | else if (bDref == Ch('\r')) result += Ch('\\'), result += Ch('r'); |
| 43 | else if (bDref == Ch('\t')) result += Ch('\\'), result += Ch('t'); |
| 44 | else if (bDref == Ch('/')) result += Ch('\\'), result += Ch('/'); |
| 45 | else if (bDref == Ch('"')) result += Ch('\\'), result += Ch('"'); |
| 46 | else if (bDref == Ch('\\')) result += Ch('\\'), result += Ch('\\'); |