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

5
LINES

< > BotCompany Repo | #169 // endsWith

Lua code

function endsWith(s, suffix)
  local x = s:sub(#s-#suffix+1, #s)
  --log(x)
  return #s >= #suffix and x == suffix
end

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

No comments. add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 122 [visualize]

Snippet ID: #169
Snippet name: endsWith
Eternal ID of this version: #169/1
Text MD5: 4dbb6b0e4f1d910f493f4d802d24c789
Author: stefan
Category: general lua functions
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-01-15 03:24:16
Source code size: 122 bytes / 5 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 1546 / 303
Referenced in: [show references]