diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-05 11:14:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-05 11:14:05 +0000 |
commit | 3a32ef53aaab15199e59c643630726b041c9fa88 (patch) | |
tree | 497cd16ea9db5b867ed794e06aff1f80ad5fb55b /README.EXT | |
parent | b80ddbf461a9a215513d6bbd78bab7185a927a31 (diff) |
* README.EXT, README.EXT.ja (String functions): mention
rb_str_resize and rb_str_set_len.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r-- | README.EXT | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/README.EXT b/README.EXT index 72dba58c5d..ac0d7cc98d 100644 --- a/README.EXT +++ b/README.EXT @@ -223,6 +223,23 @@ listed below: Creates a new Ruby string with encoding US-ASCII. + rb_str_resize(VALUE str, long len) + + Resizes Ruby string to len bytes. If str is not modifiable, this + function raises an exception. The length of str must be set in + advance. If len is less than the old length the content beyond + len bytes is discarded, else if len is greater than the old length + the content beyond the old length bytes will not be preserved but + will be garbage. Note that RSTRING_PTR(str) may change by calling + this function. + + rb_str_set_len(VALUE str, long len) + + Sets the length of Ruby string. If str is not modifiable, this + function raises an exception. This function preserves the content + upto len bytes, regardless RSTRING_LEN(str). len must not exceed + the capacity of str. + Array functions rb_ary_new() |