ruby如何判断一个数组和一个字符串之间是否有相同Q元素
答案:2 悬赏:20 手机版
解决时间 2021-11-22 01:47
- 提问者网友:酱爆肉
- 2021-11-21 05:14
ruby如何判断一个数组和一个字符串之间是否有相同Q元素
最佳答案
- 五星知识达人网友:琴狂剑也妄
- 2021-11-21 06:48
c中是strstr.
ruby 1.9.3中包含:
include? other_str → true or false click to toggle source
Returns true if str contains the given string or character.
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true
ruby 1.9.3中包含:
include? other_str → true or false click to toggle source
Returns true if str contains the given string or character.
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true
全部回答
- 1楼网友:渡鹤影
- 2021-11-21 07:00
“啪”的一声。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯