【发布时间】:2014-03-26 08:29:33
【问题描述】:
在 Ruby 中可以有多行字符串,就像 PHP 的 nowdoc [1]
例如
puts '
\\foo
'
我想输出以下没有转义的内容
\\foo
[1] Nowdocs 对于单引号字符串,就像 heredocs 对于双引号字符串一样。 nowdoc 的指定与heredoc 类似,但在nowdoc 内部不进行解析。 http://hk1.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc
【问题讨论】:
标签: ruby