Documentation for this module may be created at Module:Nano/doc
function replace_char(pos, str, r)
return str:sub(pos, pos - 1) .. r .. str:sub(pos + 1, str:len())
end
p = replace_char(1, "p", "[[File:P_w.png|26px]]")
x = replace_char(1, "x", "[[File:X_w.png|26px]]")
print(p, x)