Is there an easy way to read a string from a file and read it in little endian
format to convert to int?
I have some old file formats that I want to convert, and header information is
stored in little endian format. So far I have something like this for a WORD
(2-bytes):
Stdio.File fp;fp=Stdio.File(filename,"r");string str=fp->read(2);int
res=array_sscanf(reverse(str),"%2c")[0];
Trying to find an easy way to make it variable, like 2 or 4 byte ints (there
are some DWORDs in the file too). array_sscanf doesn't take parameters for the
format, so I can't do "%*c",2 .
Thanks..