So I come from a C background (originally originally, though I haven\'t used that language for almost 5 years) and I\'m trying to parse some values from a string in Java. In
None of these examples were really satisfactory to me so I made my own java sscanf utility:
https://github.com/driedler/java-sscanf/tree/master/src/util/sscanf
Here's an example of parsing a hex string:
String buffer = "my hex string: DEADBEEF\n"
Object output[] = Sscanf.scan(buffer, "my hex string: %X\n", 1);
System.out.println("parse count: " + output.length);
System.out.println("hex str1: " + (Long)output[0]);
// Output:
// parse count: 1
// hex str1: 3735928559