Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #221 // simplifyInput

Lua code

get("#220") -- trim

function simplifyInput(input)
  input = trim(input)
  input = input:lower()
  input = input:gsub("?$", "")
  input = input:gsub("%s+", " ")
  return input
end

test 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

Image recognition results

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: 803 / 188
Referenced in: [show references]