Present bad behaviour:
array_sscanf("1234567890123","%-3d%d");
(3) Result: ({ /* 2 elements */ 123, 4567890123 })
Yes? This is the expected behaviour.
It is, from old habit, but as it is the same behaviour as
array_sscanf("1234567890123","%3d%d");
(2) Result: ({ /* 2 elements */ 123, 4567890123 })
Bad phrasing of "we have a presently useless redundant flag which does not affect %d:s behaviour" on my part. (Only confirmed by testing; the source, or a bearded hacker's better knowledge, may prove this wrong.)
Wanted behaviour:
array_sscanf("1234567890123","%-3d%d");
(4) Result: ({ /* 2 elements */ 1234567890, 123 })
?? You want it to be relative to the size of the first argument?
Specifically, I want it to be relative to the current integer part being processed, the way present %d is the special case %-0d with my proposed improvement (rather than implementing %1d). Better example:
array_sscanf("+1234567890123 is a valid ISO date","+%-4d%2d%d%s");
(6) Result: ({ /* 4 elements */ 123456789, 1, 23, " is a valid ISO date" })
Which would be good, because sscanf presently can't parse those.