in reply to How do I safely, portably extract one or more bytes from a string?
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I safely, portably extract one or more bytes from a string?
by pg (Canon) on Nov 29, 2003 at 03:24 UTC |