2件ヒット
[1-2件を表示]
(0.057秒)
検索結果
-
String
# start _ with?(*strs) -> bool (117373.0) -
self の先頭が strs のいずれかであるとき true を返します。
self の先頭が strs のいずれかであるとき 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? -
did
_ you _ mean (37.0) -
名前のタイポによって NameError や NoMethodError が起きたと きに、自動的に他の似た名前を提案してくれるライブラリです。
名前のタイポによって NameError や NoMethodError が起きたと
きに、自動的に他の似た名前を提案してくれるライブラリです。
"Yuki".starts_with?("Y")
# => NoMethodError: undefined method `starts_with?' for "Yuki":String
# Did you mean? start_with?
デフォルトで有効になっており、無効にするにはコマンドラインオプションで
--disable=did_you_mean を指定します。
このライブラリはbundled gem(gemフ...