add example for from_byte() documenation
auto merge of #15271 : jasonthompson/rust/docs/str, r=huonw

I'm working on adding examples to the API documentation. Should future pull requests include examples for more than one function? Or is this about the right size for a pull request?