Ruby字符串处理函数

Ruby字符串处理函数 1.返回字符串的长度 str.length => integer 2.判断字符串中是否包含另外一个串 str.include? other_str #true or false "hello".include? "lo" #=> true "hello".include? "ol" #=> false "hello".include? ?h
相关文章
相关标签/搜索