Advertisement
AssortedBrunoz

Orion_API

Sep 16th, 2024
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function reset()
  2.  
  3.     term.clear()
  4.  
  5.     term.setCursorPos(1,1)
  6.  
  7. end
  8.  
  9.  
  10.  
  11. function search(str,substr)
  12.  
  13.     return string.find(string.lower(str), substr)
  14.  
  15. end
  16.  
  17.  
  18.  
  19. function split_string(str)
  20.  
  21.     local t = {}
  22.  
  23.     for character in string.gmatch(str, ".") do
  24.  
  25.         table.insert(t, character)
  26.  
  27.     end
  28.  
  29.     return t
  30.  
  31. end
  32.  
  33.  
  34.  
  35. function t_find(t, s)
  36.  
  37.     return table.foreach(t, function(a,b)
  38.  
  39.         if b == s then
  40.  
  41.             return a
  42.  
  43.         end
  44.  
  45.     end)
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement