String to binary conversion

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 3 05:47:05 PDT 2014


You could just write the string length then the data to the file 
using the .length and index things on string.

file.write(mystr.length);
file.write(mystr); // should automatically write out all the 
bytes of the string


More information about the Digitalmars-d mailing list