well, the characters in a string are for the computer already a number.
you need to look at the ascii-table (easily found on google) which character got which number.
if you only want to have lowercase charaters, you don't need to convert uppercase characters to lowercase charaters. (but if you need help at that too, just ask)
a b c d e f g.... are the numbers from 97 upwards
so, if you take the number of a character and subtract 97 you have another assignment: a=0, b=1, c=2... etc.
now you could make an array which stores the assignments like this:
numbers[26] = {2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,9}
now if you want to get the number of 'd', you first subtract 97, which gives you '3', thats the forth position in the array, which is in this case a '3'.
what i was talking about looks like this: numbers[characterToTest - 97]
but first need to make sure you don't access numbers which are lower than 97 or higher than the value of 'z', because then you access something outside of your assignment-list.
was just an idea how you could implement it, or at least what i understood you wanted to do
