るりまサーチ

最速Rubyリファレンスマニュアル検索!
32件ヒット [1-32件を表示] (0.067秒)
トップページ > クエリ:Ruby[x] > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:@[x] > クエリ:self[x] > クエリ:start[x] > クラス:String[x]

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

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

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

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

@
param prefixes パターンを表す文字列または正規表現 (のリスト)

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

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

String#start_with?(*strs) -> bool (6161.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?...

String#delete_prefix!(prefix) -> self | nil (173.0)

self の先頭から破壊的に prefix を削除します。

...self の先頭から破壊的に prefix を削除します。

@
param prefix 先頭から削除する文字列を指定します。

@
return 削除した場合は self、変化しなかった場合は nil

//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => n...
...il
//}

@
see String#delete_prefix
@
see String#delete_suffix!
@
see String#start_with?...

String#end_with?(*strs) -> bool (54.0)

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

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

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

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

@
see String#start_with?...
.../}

@
see String#start_with?
@
see String#delete_suffix, String#delete_suffix!...