If you can translate the string into Latin numerals, you can then parse that string. I've never used internationalization and Unicode, but I would think you could step through the string one character at a time and use a case statement to compare and translate. Rebuild the string using a
(which is more efficient than concatinating ordinary strings) and pass the result into Parse. A nuisance, certainly.
Once you have an algorithm that works, you could extend the Int32
] object to add a
function, which will make your code writing quite a bit easier.
- Did some research and found that extension methods only work on instanced variables; as of .Net 4.0, you cannot write static extensions. However, you could write a
extension with a name like
which attempts to convert the value of the string instance into a number.