Jump to content

How to use str_pad for Bytes?


etrader

Recommended Posts

Is there something like str_pad to make a string with a fixed width on the bases of bytes (not characters). If not, is it possible to safely convert characters to bytes to have a fixed width (of bytes). As a matter of fact, I want to use the strings (to be written to a file) as offsets for reading lines with fseek.

 

Thanks :)

Link to comment
https://forums.phpfreaks.com/topic/248690-how-to-use-str_pad-for-bytes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.