The way to approach this task to first break-up the input string into seperate values. When you say a "decimal string" of 20, do you mean a single character with an ASCII value of 20 decimal, or a 2-character string consisting of a "2" and a "0"?
Note, there is a similar issue on the "hex string" side. Do you want a single character with an ASCII value of 14 hex (which by the way is identical to a character with a ASCII value of 20 decimal); or a two-character string consisting of a "1" and a "4"?
If you can post an exact description of the input string, with perhaps a sample, I can post you an example of how to make the conversion.
Mike...
BTW: what are you going to do with this string when you're done?