zetzit / zz

πŸΊπŸ™ ZetZ a zymbolic verifier and tranzpiler to bare metal C
MIT License
1.6k stars 52 forks source link

implement 'string::from(bytes, inlen)' #84

Closed jwerle closed 4 years ago

jwerle commented 4 years ago

This PR implements a constructor function string::from() for a String+ type making it easy to create a new string from bytes and size. This is similar to slice::mut_slice::make().

jwerle commented 4 years ago

thinking about a string::from_slice() and/or string::from_mut_slice() too

aep commented 4 years ago

yup. from_mut_slice shouldnt be neeed due to autocasting..