|
-- Module for different search and replace operations on strings. local p = -- Takes one string parameter, and returns the string with all characters with special meaning for Lua patterns escaped with a preceding `%`. function p.escape_pattern(text) -- Replaces each occurrence of any of ().%+- *? local strToFind = frame.args local strToreplaceWith = frame.args local r = string.gsub(str, p.escape_pattern(strToFind), p.escape_pattern(strToreplaceWith)) return r end pwiki page name' = function( frame ) 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「モジュール:StringReplace」の詳細全文を読む スポンサード リンク
|