Jump to content
Toggle menu
  • 3.1K articles
  • 4.4K files
  • 18 users
  • 91.5K edits
Ashenzari's Archive
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:String

From Ashenzari's Archive
Revision as of 14:02, 29 November 2013 by imported>CommanderC (Created page with "local p = {} function p.first_word(frame) local text = frame.args[1] for token in string.gmatch(text, "[^%s]+") do return token end end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

function p.first_word(frame)

 local text = frame.args[1]
 for token in string.gmatch(text, "[^%s]+") do
   return token
 end

end

return p