Skip to content

Commit

Permalink
extension.rdoc: rb_str_append [ci skip]
Browse files Browse the repository at this point in the history
* doc/extension.rdoc: add rb_str_append and fix equivalent for
  rb_str_catf and rb_str_vcatf from rb_str_cat2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Apr 10, 2017
1 parent 0e96a0c commit 9adc876
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions doc/extension.ja.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ rb_tainted_str_new_cstr(const char *ptr) ::

Cの文字列から汚染マークが付加されたRubyの文字列を生成する.

rb_str_append(VALUE str1, VALUE str2) ::

Rubyの文字列str1にRubyの文字列str2を追加する.

rb_sprintf(const char *format, ...) ::
rb_vsprintf(const char *format, va_list ap) ::

Expand All @@ -251,8 +255,8 @@ rb_str_vcatf(VALUE str, const char* format, va_list ap) ::

Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
整形し,Rubyの文字列strに追加する.この関数の機能は,それぞれ
rb_str_cat2(str, rb_sprintf(format, ...)) や
rb_str_cat2(str, rb_vsprintf(format, ap)) と同等である.
rb_str_append(str, rb_sprintf(format, ...)) や
rb_str_append(str, rb_vsprintf(format, ap)) と同等である.

rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ::
rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc) ::
Expand Down
8 changes: 6 additions & 2 deletions doc/extension.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ rb_vsprintf(const char *format, va_list ap) ::
must be a VALUE). Since it conflicts with "%i", for integers in
format strings, use "%d".

rb_str_append(VALUE str1, VALUE str2) ::

Appends str2 Ruby string to str1 Ruby string.

rb_str_cat(VALUE str, const char *ptr, long len) ::

Appends len bytes of data from ptr to the Ruby string.
Expand All @@ -225,8 +229,8 @@ rb_str_vcatf(VALUE str, const char* format, va_list ap) ::

Appends C string format and successive arguments to Ruby string
str according to a printf-like format. These functions are
equivalent to rb_str_cat2(str, rb_sprintf(format, ...)) and
rb_str_cat2(str, rb_vsprintf(format, ap)), respectively.
equivalent to rb_str_append(str, rb_sprintf(format, ...)) and
rb_str_append(str, rb_vsprintf(format, ap)), respectively.

rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ::
rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc) ::
Expand Down

0 comments on commit 9adc876

Please sign in to comment.