亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問該如何在Ruby中使用字符串方法?

請問該如何在Ruby中使用字符串方法?

ibeautiful 2019-10-21 15:13:10
如何在Ruby中使用字符串方法
查看完整描述

4 回答

?
慕田峪7331174

TA貢獻1828條經驗 獲得超13個贊

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

查看完整回答
反對 回復 2019-10-26
  • 4 回答
  • 0 關注
  • 857 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號