阅读背景:

Ruby在某个地方有跨平台EOL的常量吗?

来源:互联网 

I need to format a String that ends with a newline. I'd just add a "\n", but I want this to work on Windows too. Many languages have a constant that provides the appropriate CR/LF/CRLF sequence according to the platform, but I can't seem to find anything in Ruby. Does it exist?I need to format a String that ends with a newl




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: