to change a string (text) to a number you'd create a list containing every character (letter, number, symbol, etc) you want to support and loop through the whole string, joining each letter's position in the list with the number (possibly adding leading zeroes to one digit numbers to make converting back easier: 7 -> 07)

converting back would require looping through the whole number and grabbing every pair of numbers and joining that position in the list with the current string