Before (as a rookie) I go submitting this as an R package bug, let me run it by y'all. I think all of the following are good:
replace_number("123 0 boogie")
[1] "one hundred twenty three boogie"
replace_number("1;1 foo")
[1] "one;one foo"
replace_number("47 bar")
[1] "forty seven bar"
replace_number("0")
"zero"
I think all of the following are bad because "zero" is missing from the output:
replace_number("1;0 foo")
[1] "one; foo"
replace_number("00 bar")
[1] "bar"
replace_number("0x")
[1] "x"
Basically, I'd say that replace_number()
is incapable of handling strings that contain the digit 0 (except for "0"). Is it a real bug?