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

5
LINES

< > BotCompany Repo | #42 // reverse

Lua code

t = {}
for i = #input, 1, -1 do
  table.insert(t, input:sub(i, i))
end
return table.concat(t, "")

Author comment

reverses the input string

test run  test run with input  download  show line numbers   

Relations

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

Comments [hide]

ID Author/Program Comment Date
696 #1000610 Edit suggestion:
!636
!629

main {
static Object androidContext;
static String programID;

public static void main(String[] args) throws Exception {
t = {}
for i = #input, 1, -1 do
table.insert(t, input:sub(i, i))
end
return table.concat(t, "")
}}
2015-08-19 09:28:48  delete 
694 #1000604 (pitcher) 2015-08-20 15:28:24

add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 101 [visualize]

Snippet ID: #42
Snippet name: reverse
Eternal ID of this version: #42/1
Text MD5: bf6e3fc4f5bb7ef96cfd06788cdeb9d5
Author: stefan
Category: text transformations
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2013-12-23 18:39:40
Source code size: 101 bytes / 5 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 1493 / 352
Referenced in: [show references]