I think no but if you set your text to string, you can use for example len to know the length and then loop a get substring from 0 to len where you add to your intermediate code the value you want and same when completed from this number to final code. The boring part being setting code (or one by one with array (with a check on list to ignore unregistered characters) or finding a system to automate but i have no efficient idea at the moment. If someone reads this : Give your idea ^^)
Edit : to complete : you set a first array with all the characters you want to consider for your code, you set a second array with numbers equivalent to your first array. Yous set a third and fourth arrays with final code setting.
on your loop, you check the index of the character in first array, add the value of second array at same index. To the end of the loop.
then you do all modifications you want on this code (suppress 1 of characters and divide by 1010 if you do binary and a “key” based on len for example.
Then withis new code, you do the same as first step but inverted with two new arrays.
Edit two : To discourage algorithm hunters, you can add fake characters too which are ignored in final comparison