Warning: mkdir(): No space left on device in /var/www/html/vendor/wikimedia/shellbox/src/FileUtils.php on line 137

Notice: Failed to invoke Pygments: ShellboxError [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /var/www/html/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 336] in /var/www/html/includes/debug/MWDebug.php on line 499

Notice: fwrite(): Write of 20 bytes failed with errno=28 No space left on device in /var/www/html/includes/libs/uuid/GlobalIdGenerator.php on line 553
Module:Sandbox/Colin R Robinson: Difference between revisions - wikibase Jump to content

Module:Sandbox/Colin R Robinson: Difference between revisions

From wikibase
imported>Colin R Robinson
No edit summary
imported>Colin R Robinson
No edit summary
Line 1: Line 1:
-- Define the module table
local p = {}
local p = {}
 
function p.hello(saying)
-- Function that takes a string and appends an exclamation mark
     return saying..'!'
function p.addExclamation(saying)
     -- Check if saying is not nil or empty
    if saying ~= nil and saying ~= '' then
        return saying .. "!"
    else
        return "Empty input!"
    end
end
end
 
-- Return the module table
return p
return p

Revision as of 06:05, 26 March 2024

Documentation for this module may be created at Module:Sandbox/Colin R Robinson/doc

-- Define the module table
local p = {}

-- Function that takes a string and appends an exclamation mark
function p.addExclamation(saying)
    -- Check if saying is not nil or empty
    if saying ~= nil and saying ~= '' then
        return saying .. "!"
    else
        return "Empty input!"
    end
end

-- Return the module table
return p