Modulo:String: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
fix check stringa vuota per arraytostring
m nomatch
Riga 122:
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
O
{{#invoke:String|posmatch|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
 
Riga 158:
 
if s == '' then
return nomatch or str._error( 'La stringa in cui cercare è vuota' );
end
if pattern == '' then
return nomatch or str._error( 'La stringa o pattern da cercare è vuota' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return nomatch or str._error( 'La posizione iniziale richiesta è fuori dagli estremi della stringa' );
end
if match_index == 0 then
return nomatch or str._error( 'Match index è nullo' );
end
if plain_flag then