CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 6 22:00:19 PST 2016


On Tuesday, 6 December 2016 at 23:55:06 UTC, Nordlöw wrote:
> On Tuesday, 6 December 2016 at 23:16:16 UTC, Stefan Koch wrote:
>> Yes there is.
>> Create a char[] give it the length of string a + string b;
>> copy string a into the char[]
>> then copy string b into the resulting array.
>> offsetting it by the length of string a.
>
> Sounds like you have your concat implementation right there ;)

not really, concat needs to be smart about allocation and memory 
reuse.
when used on char arrays the memory access will be different.
and use more instructions.


More information about the Digitalmars-d mailing list