Forum: Ruby string.c question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3afd3e5e05dc9310c89aa5762cc8dd1d?d=identicon&s=25 Tim Hunter (Guest)
on 2008-12-13 23:36
(Received via mailing list)
How does rb_str_cat differ from rb_str_buf_cat?

I have a a String object, a C pointer to a char array, and the length of
the array. The array is 10KB or even 100KB. I want to cat the char array
to the String. Which is the better function to use?
0ec4920185b657a03edf01fff96b4e9b?d=identicon&s=25 Yukihiro Matsumoto (Guest)
on 2008-12-20 14:55
(Received via mailing list)
In message "Re: string.c question"
    on Sun, 14 Dec 2008 07:29:17 +0900, Tim Hunter <>

|How does rb_str_cat differ from rb_str_buf_cat?

rb_str_buf_cat() is a function to use with strings created by
rb_str_buf_new().  If you're not sure use rb_str_cat().

This topic is locked and can not be replied to.