Advertisement
Miki_Tellurium

Stringhelper API

Apr 20th, 2024
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | Gaming | 0 0
  1. stringhelper = {}
  2.  
  3. function stringhelper.isInTable(str, tbl)
  4.     for _, v in ipairs(tbl) do
  5.         if v == str then
  6.             return true
  7.         end
  8.     end
  9.     return false
  10. end
  11.  
  12. function stringhelper.isBlank(str)
  13.     return str:match("^%s*$") ~= nil
  14. end
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement