るりまサーチ

最速Rubyリファレンスマニュアル検索!
59件ヒット [1-59件を表示] (0.070秒)
トップページ > クエリ:-[x] > クエリ:strip[x] > クエリ:rstrip[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

検索結果

String#rstrip -> String (24337.0)

文字列の末尾にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。

...abc\n".rstrip #=> " abc"
p " abc \t\r\n\0".rstrip #=> " abc"
p " abc".rstrip #=> " abc"
p " abc\0 ".rstrip #=> " abc"

str = "abc\n"
p str.rstrip #=> "abc"
p str #=> "abc\n" (元の文字列は変化しない)
//}

@see String#lstrip,String#strip...

String#strip -> String (18243.0)

文字列先頭と末尾の空白文字を全て取り除いた文字列を生成して返します。 空白文字の定義は " \t\r\n\f\v" です。 また、文字列右側からは "\0" も取り除きますが、 左側の "\0" は取り除きません。

...mlist[例][ruby]{
p " abc \r\n".strip #=> "abc"
p "abc\n".strip #=> "abc"
p " abc".strip #=> "abc"
p "abc".strip #=> "abc"
p " \0 abc \0".strip # => "\000 abc" # 右側のみ "\0" も取り除く

str = "\tabc\n"
p str.strip #=> "abc"
p str...
...#=> "\tabc\n" (元の文字列は変化しない)
//}

@see String#lstrip, String#rstrip...

String#rstrip! -> self | nil (12319.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...

String#lstrip -> String (6212.0)

文字列の先頭にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v" です。

...頭にある空白文字を全て取り除いた新しい文字列を返します。
空白文字の定義は " \t\r\n\f\v" です。

//emlist[例][ruby]{
p " abc\n".lstrip #=> "abc\n"
p "\t abc\n".lstrip #=> "abc\n"
p "abc\n".lstrip #=> "abc\n"
//}

@see String#strip, String#rstrip...

1.6.8から1.8.0への変更点(まとめ) (2574.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...作はなくなりました)

$defout や $deferr に代入を行うと警告がでます。
(注:1.6 に $deferr はありません)
((<ruby-dev:20961>))

$stdin にオブジェクトを代入すると標準入力からの入力メソッド(gets 等)
はそのオブジェクトにメソ...
...じ。

: ((<String#lstrip|String/lstrip>)) [new]
: ((<String#rstrip|String/rstrip>)) [new]
: ((<String#lstrip!|String/lstrip!>)) [new]
: ((<String#rstrip!|String/rstrip!>)) [new]

追加。左端あるいは右端の空白類を取り除きます。
rstrip
は、右側の "\0"...
...Symbol

: ((<Symbol/Symbol.all_symbols>)) [new]
追加 ((<ruby-dev:12921>))

=== SystemCallError

: ((<SystemCallError/SystemCallError.===>)) [new]

追加 (上記 「rescue 節の...」 を参照のこと)
((<ruby-dev:12670>))

: ((<SystemExit#status|SystemExit/status>)) [new]...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (306.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in...
...st
* String#lstrip
* String#partition
* String#reverse
* String#rjust
* String#rpartition
* String#rstrip
* String#scrub
* String#slice!
* String#slice / String#[]
* String#split
* String#squeeze
* String#strip
* String#su...
...uler. See rdoc-ref:fiber.md for more details about what operations are supported and how to implement the scheduler hooks. 16786
* Fiber.blocking? tells whether the current execution context is blocking. 16786
* Thread#join invokes the scheduler hooks `block`/`unblock` in a non-blocking exec...