How to use a char[] buffer in D
Rene Zwanenburg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jun 23 02:40:42 PDT 2016
On Thursday, 23 June 2016 at 05:59:10 UTC, Andrew Chapman wrote:
> Perfect, thank you! :-) Works like a charm.
>
> On Wednesday, 22 June 2016 at 22:41:24 UTC, H. S. Teoh wrote:
>> On Wed, Jun 22, 2016 at 09:57:04PM +0000, Andrew Chapman via
>> Digitalmars-d-learn wrote:
>
>> Maybe try:
>>
>> if (buffer[] in myHash) { ... }
>>
>> ? Does that make a difference?
>>
>>
>> T
If the keys are fixed-length, you may want to consider using
immutable(char[4]) as key. That way there is no GC allocation for
the strings at all, the only allocations are done by the AA.
More information about the Digitalmars-d-learn
mailing list