るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.239秒)

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. open3 capture2e
  4. matrix det_e
  5. matrix rank_e

ライブラリ

クラス

検索結果

String#rstrip! -> self | nil (54943.0)

文字列の末尾にある空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v\0" です。

文字列の末尾にある空白文字を全て破壊的に取り除きます。
空白文字の定義は " \t\r\n\f\v\0" です。

//emlist[例][ruby]{
str = " abc\n"
p str.rstrip! # => " abc"
p str # => " abc"

str = " abc \r\n\t\v\0"
p str.rstrip! # => " abc"
p str # => " abc"
//}

@see String#rstrip, String#lstrip