るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. string []=
  2. string slice!
  3. string slice
  4. string []
  5. string gsub!

ライブラリ

検索結果

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

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

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

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

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