Emulates the sscanf() of the C stdio library