nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58a5298
)
lib/string: escape_to_c transforms `"\t"` to `"\\t"`
author
Jean Privat
<jean@pryen.org>
Sun, 29 Mar 2015 01:58:11 +0000
(08:58 +0700)
committer
Jean Privat
<jean@pryen.org>
Sun, 29 Mar 2015 01:58:11 +0000
(08:58 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/standard/string.nit
patch
|
blob
|
history
diff --git
a/lib/standard/string.nit
b/lib/standard/string.nit
index
4892f95
..
db43964
100644
(file)
--- a/
lib/standard/string.nit
+++ b/
lib/standard/string.nit
@@
-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