string to byte array
    james 
    james at gmail.com
       
    Tue Nov  4 18:54:51 PST 2008
    
    
  
BCS Wrote:
> Reply to rickdiaz,
> 
> > how do i convert a string of chars to byte array
> > 
> > will this work:
> > 
> > ubyte[] b;
> > char[] s="test";
> > b = cast(ubyte[]) s;
> > thx in advance
> > 
> 
> note: char[] is utf-8 so that might not do exactly what you expect if you 
> are not careful about what you expect.
> 
> 
i wonder how you turn uint into ubyte array?, because above method wont work
    
    
More information about the Digitalmars-d-learn
mailing list