Timeline for Convert English to a number without built-ins or libraries
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 10, 2016 at 17:13 | comment | added | manatwork | The StackExchange site engine has an irritating habit: it inserts invisible characters (U200C Zero Width Non-Joiner and U200B Zero Width Space) into the code posted in comments. You copy-pasted them too. I edited your post to remove them. | |
Feb 10, 2016 at 17:10 | history | edited | manatwork | CC BY-SA 3.0 |
removed invisible characters inserted by site engine into the code posted as comment
|
Feb 10, 2016 at 17:03 | history | edited | Argenis García | CC BY-SA 3.0 |
added 6 characters in body
|
Feb 10, 2016 at 16:36 | comment | added | manatwork |
7 characters shorter: "one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thir;four;fif;six;seven;eigh;nine;twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety,one hundred".replace(";","teen,").split(",") .
|
|
Feb 10, 2016 at 16:26 | history | edited | Argenis García | CC BY-SA 3.0 |
This looks ugly as hell, but it's golf code so it's ok, thanks to manatwork for his advice
|
Feb 10, 2016 at 16:09 | comment | added | manatwork |
45 characters shorter: n="one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety,one hundred".split(",") But as I see, should work without assigning it to variable n, just call .index() directly on it.
|
|
Feb 10, 2016 at 15:51 | history | answered | Argenis García | CC BY-SA 3.0 |