liquid_feedback_frontend

annotate env/util/trim.lua @ 238:394e264f9f2b

Revisit fix in commit 221:7db22d3e9eea that prevented voting results to be sorted by delegations
author Ingo Bormuth <mail@ibormuth.de>
date Mon Dec 19 01:53:17 2011 +0100 (2011-12-19)
parents de8602f8d9bb
children
rev   line source
bsw/jbe@6 1 function util.trim(string)
mail@236 2 if string == nil then
mail@236 3 return string
mail@236 4 end
bsw@9 5 return (string:gsub("^%s*", ""):gsub("%s*$", ""):gsub("%s+", " "))
mail@236 6 end

Impressum / About Us