るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.215秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:u[x] > クエリ:r[x] > クエリ:d[x] > バージョン:2.5.0[x] > クエリ:delete_suffix![x]

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. ssl op_tls_d5_bug
  4. integer to_d
  5. kernel $-d

ライブラリ

クラス

検索結果

String#delete_suffix!(suffix) -> self | nil (100204.0)

self の末尾から破壊的に suffix を削除します。

self の末尾から破壊的に suffix を削除します。

@param suffix 末尾から削除する文字列を指定します。

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

//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => nil
//}

@see String#chomp!
@see String#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see S...