Difference between revisions of "Module:String"

22 bytes added ,  14:00, 24 February 2013
add str.replace_plain
>WOSlinker
(add str.replace_plain)
>WOSlinker
(add str.replace_plain)
Line 177: Line 177:


     if firstonly == 'true' or firstonly == 'yes' or firstonly == '1' then
     if firstonly == 'true' or firstonly == 'yes' or firstonly == '1' then
         local result = gsub( source_str, pattern_plain, replace_plain, 1 );
         local result = mw.ustring.gsub( source_str, pattern_plain, replace_plain, 1 );
     else
     else
         local result = gsub( source_str, pattern_plain, replace_plain, n );
         local result = mw.ustring.gsub( source_str, pattern_plain, replace_plain, n );
     end
     end


Anonymous user