11 2013 档案

摘要:最最常用的字符串处理函数1.返回字符串的长度str.length => integer中英文长度判断 require "jcode" xxx.jlength2.判断字符串中是否包含另一个串str.include? other_str => true or false "hello".include? "lo" #=> true "hello".include? "ol" #=> false "hello".include? ?h #=> true 阅读全文
posted @ 2013-11-01 10:48 yanghuhu 阅读(628) 评论(0) 推荐(0)