ForbodingAngel

Untitled

Mar 30th, 2015
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. local cats = "TANK SUB ZEPPELIN HORSE AIR"
  2. local noTargetCategory = "ZEPPELIN AIR"
  3. local Onlytargetcategory = ""
  4.  
  5. for c in cats :gmatch("%w+") do
  6. if string.find(noTargetCategory, c) == nil then
  7. Onlytargetcategory = Onlytargetcategory .. c .. " "
  8. end
  9. end
  10.  
  11. io.write ("\nnoTargetCategory was:"..noTargetCategory .. "\n")
  12. io.write ("and now Onlytargetcategory is:"..Onlytargetcategory )
  13. ---
  14. noTargetCategory was:ZEPPELIN AIR
  15. and now Onlytargetcategory is:TANK SUB HORSE
Advertisement
Add Comment
Please, Sign In to add comment