るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.013秒)
トップページ > クラス:String[x] > バージョン:2.6.0[x] > クエリ:prepend[x]

別のキーワード

  1. _builtin prepend
  2. string prepend
  3. module prepend
  4. module prepend_features
  5. _builtin prepend_features

ライブラリ

検索結果

String#prepend(*arguments) -> String (54349.0)

複数の文字列を先頭に破壊的に追加します。

複数の文字列を先頭に破壊的に追加します。

@param arguments 追加したい文字列を指定します。

//emlist[例][ruby]{
a = "!!!"
a.prepend # => "!!!"
a # => "!!!"

a = "!!!"
a.prepend "hello ", "world" # => "hello world!!!"
a # => "hello world!!!"
//}

String#prepend(other_str) -> String (54334.0)

文字列 other_str を先頭に破壊的に追加します。

文字列 other_str を先頭に破壊的に追加します。

@param other_str 追加したい文字列を指定します。

//emlist[例][ruby]{
a = "world"
a.prepend("hello ") # => "hello world"
a # => "hello world"
//}