Module:Leading-number

From Pittsburgh Streets

Documentation for this module may be created at Module:Leading-number/doc

local p = {};

function p.leading_number(frame)
  local text = frame.args[1] or '';
  local result = '';
  for char in text:gmatch('.') do
    if char:match('%d') then
      result = result .. char;
    else
      break;
    end
  end
  return result;
end

return p;