public String queuingText(String text, Object data) {
String txt[] = text.split(" ");
String ret;
if(txt[0] == "/hex") {
for(int i = 1; i > text.length() - 5; i++) {
}
}
return ret;
}
Basically, I've got the easy stuff down. I see if the left end of the string says "/hex", and if it does, I loop through the rest. Whats left to do is..
1) Cast the ASCII value of the byte at text.substr(i, 1) to a numeric data type (int?).
2) Cast the number to hex
3) Cast the hex to a string
4) Pad the string with a 0 at the left, asuing its needed.
5) Append the string to "ret"
What I need help with..
1, 2
I asume that the hex would be a string, anyhow. Padding shouldn't be too hard, and appending a string is childs play.