Well, that's the thing, the string is filled from some external input source and I have no idea what type of data is in it. All I know is how many bytes it contains and how many I need to extract from it. Most likely it will contain arbitrary binary data like a JPEG or tarball, however, it may also contain 8 bit ISO Latin-1 and even Unicode, which means substr() won't work right and will end up extracting entire multi-byte characters instead of just bytes.
In reply to Re: Re: How do I safely, portably extract one or more bytes from a string?
by Anonymous Monk
in thread How do I safely, portably extract one or more bytes from a string?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |