scanf like utility forked from http://www.kigen.de/development/java/stringparser/index.html