nokizorque

Untitled

Nov 4th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.17 KB | None | 0 0
  1. whiteSpace = 0
  2. var = "gay rights america fuck commies"
  3. for i=1, #var do
  4.     if (string.sub(var, i, i) == " ") then -- or you can do %s
  5.         whiteSpace = whiteSpace + 1
  6.     end
  7. end
Advertisement
Add Comment
Please, Sign In to add comment