Aluigi, do you have any plans to fix sscanf in quickbms? Recently I stumbled upon a format that would benefit from it, as the entire file table is stored in text form:
I used the string "s" operator to extract the numeric values, but I had to use a crappy workaround (shift_left first 38 characters) to get the file name. A solution with working %s operator would be much cleaner.
The limit of the sscanf 's' implementation in quickbms is the support for numeric-only fields, that's made mainly for security but also because sscanf is not ideal for strings. I highly suggest you to opt for the 'S' operator that works great:
String ELEMENTS S YOUR_STRING OUT_VAR1 OUT_VAR2 OUT_VAR3 OUT_VARN
where: ELEMENTS is the output variable containing the number of variables that have been filled with values YOUR_STRING is just your input string, for example: hello1, "hello 2 " 'hello3' OUT_VAR will get the values read from the input string. That's good also for the numeric fields because they are read as string and will be interpreted as numbers in the math operations.