toChars buffer access?

Steven Schveighoffer schveiguy at gmail.com
Thu Jun 9 21:16:48 UTC 2022


On 6/9/22 4:31 PM, bauss wrote:
> 
> .array on the result from .toChars perhaps?
> 
> Or is there a specific reason that cannot be done?
> 
> ```d
> someNumber.toChars.array
> ```

This allocates. For a temporary array, this is wasteful (it will be 
thrown away immediately).

My original example is to look up a key in an AA (not to store one).

-Steve


More information about the Digitalmars-d mailing list