るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.167秒)

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. openssl n
  3. rsa n
  4. rsa n=
  5. openssl n=

ライブラリ

検索結果

String#insert(pos, other) -> self (72628.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#[]=...