2件ヒット
[1-2件を表示]
(0.138秒)
別のキーワード
検索結果
-
String
# include?(substr) -> bool (63712.0) -
文字列中に部分文字列 substr が含まれていれば真を返します。
文字列中に部分文字列 substr が含まれていれば真を返します。
@param substr 検索する文字列
//emlist[例][ruby]{
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true
//} -
Set
# include?(o) -> bool (54358.0) -
オブジェクト o がその集合に属する場合に true を返します。
オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//}