Difference between pages "Module:Util" and "Card Gallery:Time Thief Perpetua"

From Yugipedia
(Difference between pages)
Jump to: navigation, search
m (Fix copy paste...)
 
(Restoring revision 4948984 by User:Cardsknower on 2022-04-17 08:13:45.)
 
Line 1: Line 1:
-- <pre>
+
{{Navigation}}
-- @name Util
 
-- @description Holds commonly used simple functions.
 
-- @author [[User:Becasita]]
 
-- @contact [[User talk:Becasita]]
 
  
-------------------
+
{{Card gallery|region=EN|
-- Export variable:
+
IGAS-EN094; Ignition Assault; SR; 1E
-------------------
+
IGAS-EN094; Ignition Assault; StR; 1E
local U = {};
+
IGAS-EN094; Ignition Assault; SR; UE
 +
GFTP-EN065; Ghosts From the Past (set); UR; 1E
 +
}}
  
-------------
+
{{Card gallery|region=FR|
-- Functions:
+
IGAS-FR094; Ignition Assault; SR; 1E
-------------
+
IGAS-FR094; Ignition Assault; StR; 1E
-- @name trim
+
IGAS-FR094; Ignition Assault; SR; UE
-- @description Trims white space from front and tail of string. Returns nil if only whitespace.
+
GFTP-FR065; Ghosts From the Past (set); UR; 1E
-- @see [[mw:Extension:Scribunto/Lua reference manual#mw.text.trim]]
+
}}
function U.trim( s )
 
if s and not s:match( '^%s*$' ) then
 
return mw.text.trim( s );
 
end
 
end
 
  
-- @name count
+
{{Card gallery|region=DE|
-- @description Counts the number of elements in a table.
+
IGAS-DE094; Ignition Assault; SR; 1E
function U.count( t )
+
IGAS-DE094; Ignition Assault; StR; 1E
local counter = 0;
+
IGAS-DE094; Ignition Assault; SR; UE
for key, value in pairs( t ) do
+
GFTP-DE065; Ghosts From the Past (set); UR; 1E
counter = counter + 1;
+
}}
end
 
return counter;
 
end
 
  
-- @name link
+
{{Card gallery|region=IT|
--[=[function U.link( page, label )
+
IGAS-IT094; Ignition Assault; SR; 1E
return ('[[%s|%s]]'):format( page, label or mw.text.split(  ) ) or ('[[%s]]'):format( page );
+
IGAS-IT094; Ignition Assault; StR; 1E
end]=]
+
IGAS-IT094; Ignition Assault; SR; UE
 +
GFTP-IT065; Ghosts From the Past (set); UR; 1E
 +
}}
  
-- @name isSomething
+
{{Card gallery|region=PT|
-- @description Meta-function for type checkers.
+
IGAS-PT094; Ignition Assault; SR; 1E
local function isSomething( toCompare, compareTo )
+
IGAS-PT094; Ignition Assault; StR; 1E
return type( toCompare ) == type( compareTo );
+
IGAS-PT094; Ignition Assault; SR; UE
end
+
GFTP-PT065; Ghosts From the Past (set); UR; 1E
 +
}}
  
-- @name isNumber
+
{{Card gallery|region=SP|
function U.isNumber( v )
+
IGAS-SP094; Ignition Assault; SR; 1E
return isSomething( v, 1 );
+
IGAS-SP094; Ignition Assault; StR; 1E
end
+
IGAS-SP094; Ignition Assault; SR; UE
 +
GFTP-SP065; Ghosts From the Past (set); UR; 1E
 +
}}
  
-- @name isString
+
{{Card gallery|region=JP|
function U.isString( v )
+
EP19-JP044; Extra Pack 2019 :: OP
return isSomething( v, '' );
+
EP19-JP044; Extra Pack 2019; ScR
end
+
SLT1-JP026; Selection 10; C
 +
}}
  
-- @name isTable
+
{{Card gallery|region=SC|
function U.isTable( v )
+
MGP4-SC100; Mega Pack 04; UR
return isSomething( v, {} );
+
}}
end
 
  
----------
+
{{Card gallery|region=KR|
-- Return:
+
EP19-KR044; Extra Pack 2019; ScR; UE
----------
+
SLT1-KR026; Selection 10; C; UE
return U;
+
}}
-- </pre>
+
 
 +
{{Card gallery|region=JP|type=Video game|
 +
LOD2 :: artwork
 +
}}
 +
 
 +
{{Card gallery|region=EN|type=Video game|
 +
MADU :: artwork
 +
}}
 +
 
 +
{{Card gallery|region=JP|type=Other|
 +
TimeThiefPerpetua-OW.png // twitter::1169550743679823874
 +
}}

Revision as of 07:31, 16 March 2023