读书人

Ruby中是怎么理字符串的

发布时间: 2012-10-26 10:30:58 作者: rapoo

Ruby中是如何理字符串的?

A:"" 中可以嵌入#{}输出表达式的值,或者是character escapes



Q:ruby中字符编码?
Q:在ruby中puts "中" 出现"invalid multitype char<us-ASCII>"
A:ruby中的source code 默的是US-ACSII,不能解析中文。需要把源文件的改“合”的方式,繁是












#intern#Return the Symbol corresponding to str, creatin the symbol if it did not #previously existputs "intern"p "ruby".intern #:ruby

读书人网 >Ruby Rails

热点推荐