Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 1:
Zeile 1:
− +
Zeile 9:
Zeile 9:
+
+
+
+
+
+
+
+
+
+
Zeile 17:
Zeile 27:
+
Zeile 30:
Zeile 41:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Zeile 94:
Zeile 128:
− +
Zeile 123:
Zeile 157:
− +
+
+
− else
− r = r .. mw.ustring.sub( adjust, k )
Zeile 139:
Zeile 173:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
update; + Modul:TextUtil
--[=[ 2013-11-07
--[=[ 2014-02-15
Text utilities
Text utilities
]=]
]=]
local patternLatin = false
local patternLatin = false
local patternTerminated = false
local patternTerminated = false
Text.concatParams = function ( args, apply )
-- Concat list items into one string
-- Parameter:
-- args -- table (sequence) with numKey=string
-- apply -- string (optional); separator (default: "|")
-- Returns: string
end -- Text.concatParams()
-- analyse -- string
-- analyse -- string
-- Returns: true, if CJK detected
-- Returns: true, if CJK detected
local r
if not patternCJK then
if not patternCJK then
patternCJK = mw.ustring.char( 91,
patternCJK = mw.ustring.char( 91,
return r
return r
end -- Text.containsCJK()
end -- Text.containsCJK()
Text.listToText = function ( args, adapt )
-- Format list items similar to mw.text.listToText()
-- Parameter:
-- args -- table (sequence) with numKey=string
-- adapt -- string (optional); format including "%s"
-- Returns: string
local collect = { }
for k, v in pairs( args ) do
if type( k ) == "number" then
v = mw.text.trim( v )
if v ~= "" then
if adapt then
v = mw.ustring.format( adapt, v )
end
table.insert( collect, v )
end
end
end
return mw.text.listToText( collect )
end -- Text.listToText()
for i = 1, n do
for i = 1, n do
c = mw.ustring.codepoint( adjust, i, i )
c = mw.ustring.codepoint( adjust, i, i )
if c > 32 then
if c > 64 then
if flat( c ) then
if flat( c ) then
if j then
if j then
end
end
end -- for i
end -- for i
if j and m < n then
if not j or m then
r = r .. mw.ustring.sub( adjust, k )
else
r = form( n )
r = form( n )
end
end
end
end
function p.containsCJK( frame )
function p.containsCJK( frame )
return Text.containsCJK( frame.args[ 1 ] or "" ) and "1" or ""
return Text.containsCJK( frame.args[ 1 ] or "" ) and "1" or ""
end
function p.listToText( frame )
local args
local template = frame.args.template
if type( template ) == "string" then
template = mw.text.trim( template )
template = ( template == "1" )
end
if template then
args = frame:getParent().args
else
args = frame.args
end
return Text.listToText( frame.args, frame.args.format )
end
end