0
我有一个算法来识别在.txt文件中使用的分隔符。我想输出使用cat()
找到的分隔符。我使用%s
与sprintf()
无济于事。如何使用sprintf显示字符串“ t”?
current.sep = "\t"
cat(sprintf("Found separator : %s. \n", current.sep))
## Found separator : .
cat(sprintf("Found separator : %s. \n", "current.sep"))
## Found separator : current.sep.
## I want:
## Found separator : \t.
这...是显示它? '##找到分隔符:.'(注释去掉了空格,但是w/e)有一个'\ t',不是吗? –