One of the methods I need to program needs to decode a simple ascii input using preassigned decode String: here's the example of what it needs to do:

In this example I have simple text input with some random characters (cbdacsia...) and decode string (3102). Input text is then cut into 4 char blocks (number of characters in decode string). To decode this input, I need to rearrange place of the characters input according to the decode string ( ie. "c" is located on position "0"; in string decode "0" is located on third position, after which "c" is placed on this new position)
It's really simple, and I think it can be programed in matter of minutes, but I'm newbie and I really need help. I'd really appreciate any help, so I can at least start programing this method.
btw, real text input is much larger and decode string varies. Decode string also shouldn't contain two same numbers/chars.
Anyway, thanks in advance for any help
EDIT: better use long instead String for "decode"
Edited by 1988, 07 April 2010 - 05:04 AM.


Sign In
Create Account

Back to top









