Subject: [ruby-core:20681] Re: [Feature #905] Add String.new(fixnum) to preallocate large buffer
From: Charles Oliver Nutter <charles.nutter sun.com>
Date: Fri, 19 Dec 2008 12:05:45 +0900
References: 2067120673
In-reply-to: 20673
Dave Thomas wrote:
> (presumably n is in bytes, not characters)
Yes, I'm thinking bytes myself. Presumably you either want just a byte
buffer or you know how many bytes you need to allocate for the character
encoding you intend.