From Dark and Darker Wiki
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
function p.insert_space_before_capitals(input_text)
if type(input_text) == "table" and input_text.args then -- if called via wikitext instead of lua
local frame = input_text
input_text = frame.args[1]
end
-- Add a space before each capital letter that is not the first character
local output_text = input_text:gsub("(%S)(%u)", "%1 %2")
return output_text
end
function p.dash_for_space(input_text)
if type(input_text) == "table" and input_text.args then -- if called via wikitext instead of lua
local frame = input_text
input_text = frame.args[1]
end
return input_text:gsub(" ", "-")
000
1:0
Templates used on this page:
Return to Module:Utilities.