std.stringbuffer
Me Here
p9e883002 at sneakemail.com
Wed Apr 30 03:06:13 PDT 2008
Janice Caron wrote:
>
>But <shrugs> - if people don't want StringBuffers, who am I to argue?
What's in a name? Pre-conceptions of other worlds and other tools.
Specifically Java.
Additionally, the casing suggests a class?
For my part, I simply want string functions that operate on char[]s.
Because, I percieve that for the type of mutations I am currently doing,
Invarient strings would incur too high a cost.
If your StringBuffer concept would accept and manipulate char[]s
and not require the instantiation, initialisation and syntax of an object.
By which I mean that if having used a string function upon my char[]
I can still apply slice operations to it using the standard syntax.
And then apply another string function, and then another slice.
Or even, apply a string function to a slice of a larger string and
mutate that larger string, in-place through the slice:
char[] a = ...2000 chars from somewhere.
char[] field1 = a[ 312 .. 357 ];
field1.toUpper();
char[] checksum = a[ $-16 .. $ ];
checksum = md5hex( a );
...
Then I will be very happy.
Beyond that, I have no requirements :)
All the stuff about warnings and internal and external lengths was just
speclation
about what might be going on inside on the basis of what I know, have seen
(Perl)
and have personally implemented. (Not Perl).
Cheers, b.
Ps. Is there a paper/article/reference on the reasoning behind Invariant
strings somewhere?
--
More information about the Digitalmars-d
mailing list