std.stringbuffer

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue Apr 29 16:39:23 PDT 2008


A couple of thoughts:

Janice Caron wrote:
> Hi all,
> 
> More than one person has complained about the lack of string functions
> in Phobos which operate on mutable chars. In the thread titled "Is all
> this Invariant ****....", I suggested creating a new module,
> std.stringbuffer, to contain two things:
> 
> (1) a StringBuffer class
 > (2) parallel mutable versions of the functions in std.string.
 >

I'm with Jarret here, why the hell do we need a StringBuffer class? 
'string' is not a class either, so just use char[].

I would recomment aliasing char[] to 'mstring' (short for mutable 
string. I think such an alias is more readable than 'char[]'

Also, is there a reason why these mutable functions shouldn't be in 
std.string, together with their invariant/const brethren? I don't think 
it makes sense to have another package if one opt by the (2) solution.


-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list