るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.075秒)
トップページ > クラス:String[x] > クエリ:_builtin[x] > クエリ:sub[x] > クエリ:include?[x] > ライブラリ:ビルトイン[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

String#include?(substr) -> bool (26221.0)

文字列中に部分文字列 substr が含まれていれば真を返します。

...文字列中に部分文字列 substr が含まれていれば真を返します。

@param substr 検索する文字列

//emlist[例][ruby]{
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true
//}...