I'm looking for an elegant way to read in a binary file, and delete up to a certain byte pattern. For example, if I'm looking for
0x0D 0x0Awhat would be the best way to delete up to these bytes up to, but NOT including them?
Should I use `getc` to test each byte? Then if it is true, grab the offset. Then how would I delete to that offset (minus two bytes)? (I heard that `getc` was frowned down upon.)
Thanks for any pointers.
In reply to Manipulating Binary files by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |