Put the declaration where it is used, not at the top of functions. Actually, you don't need a temporary here at all, just do `return buf.extractString()` at the end. That being said I'm not fond of introducing another `toChars` method like this, and you haven't documented it.

@yebblies: Whaddya think about just doing this in-line or through a helper function instead of making it another new member function like this?