On Wed, Aug 14, 2019 at 03:11:44PM +0000, berni via Digitalmars-d-learn wrote: [...] > but unfortunately this does not work: > > > ubyte[] convert_string_pair(string first, string second) > > { > > return 0x00 ~ first ~ 0x00 ~ second ~ 0x00; > > } > > The reason is, that this expression creates a string and not a > ubyte[]...
Try: ubyte[] convert_string_pair(string first, string second) { return cast(ubyte[])(0x00 ~ first ~ 0x00 ~ second ~ 0x00); } T -- What did the alien say to Schubert? "Take me to your lieder."