lib/string: escape_to_c transforms `"\t"` to `"\\t"`
[nit.git] / lib / standard / string.nit
index 4892f95..db43964 100644 (file)
@@ -538,6 +538,8 @@ abstract class Text
                        var c = chars[i]
                        if c == '\n' then
                                b.append("\\n")
+                       else if c == '\t' then
+                               b.append("\\t")
                        else if c == '\0' then
                                b.append("\\0")
                        else if c == '"' then