instance method String#prepend
prepend(other_str) -> String
-
文字列 other_str を先頭に破壊的に追加します。
- [PARAM] other_str:
- 追加したい文字列を指定します。
例:
a = "world" a.prepend("hello ") # => "hello world" a # => "hello world"
class String
prepend(other_str) -> String
文字列 other_str を先頭に破壊的に追加します。
例:
a = "world" a.prepend("hello ") # => "hello world" a # => "hello world"