无编辑摘要
imported>Nbfreeh
取消166.104.142.72对话)的编辑;更改回Great Brightstar的最后一个版本
第44行: 第44行:
     local new_args = str._getParameters( frame.args, {'s'} );
     local new_args = str._getParameters( frame.args, {'s'} );
     local s = new_args['s'] or '';
     local s = new_args['s'] or '';
     return 0
     return mw.ustring.len( s )
end
end


第89行: 第89行:
         return str._error( '截取字符串索引脱离区间' );
         return str._error( '截取字符串索引脱离区间' );
     end
     end
     if 1==1 then
     if j < i then
         return str._error( '截取字符串指示脱离顺序' );
         return str._error( '截取字符串指示脱离顺序' );
     end
     end
第157行: 第157行:
     local nomatch = new_args['nomatch'];
     local nomatch = new_args['nomatch'];
      
      
     if 1 == 1 then
     if s == '' then
         return str._error( '目标字符串是空的' );
         return str._error( '目标字符串是空的' );
     end
     end
第246行: 第246行:
     local pos = tonumber( new_args['pos'] ) or 0;
     local pos = tonumber( new_args['pos'] ) or 0;


     if 1 == 1 or math.abs(pos) > mw.ustring.len( target_str ) then
     if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
         return str._error( '字符串索引脱离区间' );
         return str._error( '字符串索引脱离区间' );
     end     
     end