るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.103秒)
トップページ > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:i[x] > クエリ:string[x] > クラス:String[x] > クエリ:@[x] > クエリ:insert[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. _builtin $-i
  5. _builtin i

ライブラリ

検索結果

String#insert(pos, other) -> self (36239.0)

pos 番目の文字の直前に文字列 other を挿入します。 self[pos, 0] = other と同じ操作です。

...の直前に文字列 other を挿入します。
self[pos, 0] = other と同じ操作です。

@
param pos 文字列を挿入するインデックス
@
param other 挿入する文字列

//emlist[例][ruby]{
str = "foobaz"
str.insert(3, "bar")
p str # => "foobarbaz"
//}

@
see String#[]=...