Update:
With the previous solution you can then use substr normally, but it would return by byte instead of by character.
Or, perhaps more clearly, you could use the vec function with a third argument of 8. This has the advantage of being an lvalue (the bytes::substr() function isn't, unfortunately).
In reply to Re: How do I safely, portably extract one or more bytes from a string?
by jweed
in thread How do I safely, portably extract one or more bytes from a string?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |