问题
I must write a stringToNumber
parsing function that can use custom strings for the following:
- decimal separator (
.
for en-US =>3.1415
) - thousands separator (
,
for en-US =>1,000,000
) - positive sign (
+
for en-US =>+5
) - negative sign (
-
for en-US =>-5
)
Can I assume that these are only one character (which would make the implementation easier) or are there any cultures in which any of these are longer?
来源:https://stackoverflow.com/questions/46538917/are-there-cultures-in-which-the-decimal-separator-is-longer-than-one-character