Module:User:Erutuon/05

local export = {}

local isCombining = require("Module:Unicode data").is_combining

local function getLength(str) local length = 0 for codepoint in mw.ustring.gcodepoint(str) do		if not isCombining(codepoint) then length = length + 1 end end return length end

local function displayLength(str) return str .. " (" .. getLength(str) .. " non-combining characters long)" end

function export.show(frame) local output = {} for i, arg in ipairs(frame.args or {}) do		table.insert(output, displayLength(arg)) end return table.concat(output, ", ") end

return export