Module:String: Diferans ant vèsyon yo
Contenu supprimé Contenu ajouté
Aucun résumé des modifications |
Aucun résumé des modifications Baliz : Révoqué |
||
Liy 115 :
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:String|
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Liy 333 :
local source_str = new_args[ 'source' ] or ''
local pattern = new_args[ 'pattern' ] or ''
local replace = new_args[ '
local count = tonumber( new_args[ 'count' ] )
local plain = new_args[ 'plain' ] or true
Liy 344 :
if plain then
pattern = str._escapePattern( pattern )
replace =
end
Liy 374 :
local s = new_args[ 's' ] or ''
local n = tonumber( new_args[ 'n' ] ) or 1
return mw.ustring.rep( s, n )
end
Ligne 440 ⟶ 434 :
Helper function to handle error messages.
]]
function str._error(
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
Ligne 450 ⟶ 444 :
end
local error_str = '<strong class="error">String Module Error: ' ..
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
Ligne 485 ⟶ 479 :
]]
function str._escapePattern( pattern_str )
return
end
|