How to embed static strings to a D program?

Adam D. Ruppe destructionator at gmail.com
Mon Oct 16 13:51:20 UTC 2017


On Monday, 16 October 2017 at 06:03:40 UTC, evilrat wrote:
> can cast to ubyte[] for binary too, be careful with enums 
> though, because enum arrays will allocate every time you access 
> it

Arrays yes, but not strings. So you can do `enum data = 
import("strings.txt");`.



More information about the Digitalmars-d-learn mailing list