るりまサーチ

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

別のキーワード

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

ライブラリ

検索結果

String#start_with?(*prefixes) -> bool (26101.0)

self の先頭が prefixes のいずれかであるとき true を返します。

..."string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}

@see String#end_with?
@see String#delete_prefix, String#d...

String#start_with?(*strs) -> bool (26101.0)

self の先頭が strs のいずれかであるとき true を返します。

...れかであるとき true を返します。

@param strs パターンを表す文字列 (のリスト)

//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
//}

@see String#end_with?...