[DOC] mention rb_str_modify
[ruby-core:91134] [Bug #15543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b4ab9c0e32
commit
7a86165d43
@ -301,6 +301,14 @@ rb_str_set_len(VALUE str, long len) ::
|
|||||||
lenバイトまでの内容は保存される.lenはstrの容量を越えてい
|
lenバイトまでの内容は保存される.lenはstrの容量を越えてい
|
||||||
てはならない.
|
てはならない.
|
||||||
|
|
||||||
|
rb_str_modify(VALUE str) ::
|
||||||
|
|
||||||
|
Rubyの文字列の変更する準備をする.strが変更可能でなければ例
|
||||||
|
外が発生する.strのバッファが共有されている場合は,新しいバッ
|
||||||
|
ファを割り当てて共有されていない状態にする.RSTRING_PTRを使っ
|
||||||
|
て中身を変更したり,rb_str_set_lenを呼んだりする前には,
|
||||||
|
必ずこの関数を呼ばなけれならない.
|
||||||
|
|
||||||
==== 配列に対する関数
|
==== 配列に対する関数
|
||||||
|
|
||||||
rb_ary_new() ::
|
rb_ary_new() ::
|
||||||
|
@ -279,6 +279,14 @@ rb_str_set_len(VALUE str, long len) ::
|
|||||||
up to len bytes, regardless RSTRING_LEN(str). len must not exceed
|
up to len bytes, regardless RSTRING_LEN(str). len must not exceed
|
||||||
the capacity of str.
|
the capacity of str.
|
||||||
|
|
||||||
|
rb_str_modify(VALUE str) ::
|
||||||
|
|
||||||
|
Prepares a Ruby string to modify. If str is not modifiable, this
|
||||||
|
function raises an exception, or if the buffer of str is shared,
|
||||||
|
this function allocates new buffer to make it unshared. Always
|
||||||
|
you MUST call this function before modifying the contents using
|
||||||
|
RSTRING_PTR and/or rb_str_set_len.
|
||||||
|
|
||||||
==== Array Functions
|
==== Array Functions
|
||||||
|
|
||||||
rb_ary_new() ::
|
rb_ary_new() ::
|
||||||
|
Loading…
x
Reference in New Issue
Block a user