On Wednesday, 5 April 2017 at 22:05:07 UTC, H. S. Teoh wrote:
If you are doing lots of concatenation and produce a single big
string at the end, take a look at std.array.appender.
Though if you're concerned about performance, you really should
run a profiler. Last I heard, appender may not be
On Wednesday, 5 April 2017 at 21:58:16 UTC, Inquie wrote:
What I am looking for is something like StringBuilder in C#.
std.array.appender
On Wednesday, 5 April 2017 at 21:58:16 UTC, Inquie wrote:
What I am looking for is something like StringBuilder in C#.
If you want it to not copy data on expand, there's nothing like
that in D yet. I wrote one for myself :)
On Wed, Apr 05, 2017 at 09:58:16PM +, Inquie via Digitalmars-d-learn wrote:
> I have a lot of string concatenation to do and I'm wondering if char[]
> is faster? Does it simply extend the buffer or are new buffers created
> every time?
>
> What I am looking for is something like StringBuilder
On Wednesday, 5 April 2017 at 21:58:16 UTC, Inquie wrote:
I have a lot of string concatenation to do and I'm wondering if
char[] is faster?
No, they are the same.
Does it simply extend the buffer or are new buffers created
every time?
Both will extend the buffer when the runtime can
I have a lot of string concatenation to do and I'm wondering if
char[] is faster? Does it simply extend the buffer or are new
buffers created every time?
What I am looking for is something like StringBuilder in C#.