I need an equivalent to C's vsscanf()
in Java. More detailled, I have this here:
private void parseString(String parseMe, String format, Object[] args) {
// something like: vsscanf(parseMe, format, args);
}
Note that I have indeed read about an equivalent for sscanf(), so it could be done easily from there. But I ask myself whether there is a more elegant solution than filling args with a for loop.
Also, it would be nice if the solution allows using varargs instead of an array, too. See below.
parseString(str, format, x, y, z);