include?(substr) -> bool[permalink][rdoc]-
文字列中に部分文字列 substr が含まれていれば真を返します。
- [PARAM] substr:
- 検索する文字列
"hello".include? "lo" #=> true "hello".include? "ol" #=> false "hello".include? ?h #=> true
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
include?(substr) -> bool[permalink][rdoc]文字列中に部分文字列 substr が含まれていれば真を返します。
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true