In Rust, given a string and a start and end byte offset – or, since it is possible to view a string as an array of bytes, a byte array and a start and end offset – what's the most efficient/idiomatic way to make another string from that slice?
I've got as far as finding String::from_utf8
which will take an entire byte array; is there an alternative function that can take a slice of a byte array? Or, is there a function that can extract part of a byte array, suitable for feeding as input to the above function? Or some other way to achieve the same goal?