Open Stjerneklar opened 8 years ago
Kretenkobr2 : Stjerneklar I am pretty sure that is the pattern, the same number before and after the dot
seems like the number after the number after the dot must be different?
Error in number to English function.
OK here is everything we know i one place for better readability, I hope it helps:
1) When numbers are split by anything, be it dot, comma or space, & the number between and after the split are the same(like in 2.29), it reads numbers wrong, and after the spit reads digit by digit(two dot two nine, and it should read two dot twentynine).
2) Our numberToEnglish system is in south Asian numbering system.
3) The problem lies in the way we split numbers into chunks to read, as opposed to numberToEnglish function, since we replaced numberToEnglish function multiple times with different copy-pastes from different sources and it still wouldn't work. This is current split-join part:
var numbermatches = getNumbers(linetoread);
$.each(numbermatches, function(i) {
linetoread = linetoread.split(numbermatches[i]).join(numberToEnglish(numbermatches[i]));
});
change the way numbers are split?
v.2.29 fails
console log:
v.2.29 v. two. two9