User:Belove/AOM Sample Rename Patterns: Difference between revisions

m
(→‎replacegreedy() / replacegreedyi(): fixed bug that could produce incorrect results when length(find) <> 2)
m (→‎replacegreedy() / replacegreedyi(): slightly more efficient)
Line 73: Line 73:
copy(param1, replacegreedy_text_pos, 1) _
copy(param1, replacegreedy_text_pos, 1) _
) + _
) + _
set('replacegreedy_new_text_len', length(replacegreedy_new_text)) + _
set('replacegreedy_text_found', _
set('replacegreedy_text_found', _
copy(replacegreedy_new_text, _
copy(replacegreedy_new_text, _
(length(replacegreedy_new_text) - replacegreedy_find_len) + 1, _
(replacegreedy_new_text_len - replacegreedy_find_len) + 1, _
replacegreedy_find_len _
replacegreedy_find_len _
) _
) _
Line 83: Line 84:
starti(replacegreedy_text_found, param2) _
starti(replacegreedy_text_found, param2) _
), _
), _
set('replacegreedy_new_text_len', length(replacegreedy_new_text)) + _
set('replacegreedy_new_text', _
set('replacegreedy_new_text', _
if(replacegreedy_new_text_len <> replacegreedy_find_len, _
if(replacegreedy_new_text_len <> replacegreedy_find_len, _
13

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.