I am puzzled how to parse a "float-string" to a float, based on knowing the i18n-locale but not making presumptions about the string.
Example: Germans, like me, write "1.234,87" when Americans write "1,234.87". In my project I do know what locale I do expect, but I do not want to "hard code" what presumptions I have about how that local writes that stuff.
I would hate to do regexp/stringreplacements.
Is there a generic way to say something like
myFloat := ParseFloatByLocale("1.234,76", "DE-DE")
// myFloat => 1234.76
strconvdoesn't seem to have this functionality, neither does x/text/language
Grateful for any hints!