get("#220") -- trim
function simplifyInput(input)
input = trim(input)
input = input:lower()
input = input:gsub("?$", "")
input = input:gsub("%s+", " ")
return input
endtest run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 187 | [visualize] |
| Snippet ID: | #221 |
| Snippet name: | simplifyInput |
| Eternal ID of this version: | #221/1 |
| Text MD5: | 923bc7a7b88ca1fb836d1d5579333e93 |
| Author: | stefan |
| Category: | bot tools |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2014-02-01 18:31:25 |
| Source code size: | 187 bytes / 9 lines |
| Pitched / IR pitched: | Yes / Yes |
| Views / Downloads: | 1047 / 244 |
| Referenced in: | #219 - How many processors #222 - Test for simplifyInput #3000190 - Answer for stefanreich(>> t 20 questions) #3000382 - Answer for ferdie (>> t = 1, f = 0) |