Module:Util/strings/ startsWith/Documentation/Spec: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search
(Created page with "local p = {} function p.Documentation() return { params = {"substr"}, returns = "A function that accepts a string and returns a boolean indicating whether the string starts with <code>substr</code>.", cases = { { snippet = 1, expect = {}, }, { snippet = 2, expect = {}, } } } end return p")
 
No edit summary
 
Line 8: Line 8:
{
{
snippet = 1,
snippet = 1,
expect = {},
expect = {true, false},
},
},
{
{
snippet = 2,
snippet = 2,
expect = {},
expect = {"Agahnim", "Arrghus"},
}
}
}
}

Latest revision as of 20:44, 19 May 2024

Documentation for this module may be created at Module:Util/strings/ startsWith/Documentation/Spec/Documentation

local p = {}

function p.Documentation()
	return {
		params = {"substr"},
		returns = "A function that accepts a string and returns a boolean indicating whether the string starts with <code>substr</code>.",
		cases = {
			{
				snippet = 1,
				expect = {true, false},
			},
			{
				snippet = 2,
				expect = {"Agahnim", "Arrghus"},
			}
		}
	}
end

return p