prepend(other_str) -> String[permalink][rdoc]-
文字列 other_str を先頭に破壊的に追加します。
- [PARAM] other_str:
- 追加したい文字列を指定します。
例:
a = "world" a.prepend("hello ") # => "hello world" a # => "hello world"
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
prepend(other_str) -> String[permalink][rdoc]文字列 other_str を先頭に破壊的に追加します。
例:
a = "world"
a.prepend("hello ") # => "hello world"
a # => "hello world"