added support for this to the c++ api

** Changed in: mudlet
       Status: Confirmed => Fix Committed

-- 
Add replaceWildcard to LuaGlobal.lua
https://bugs.launchpad.net/bugs/298877
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.

Status in Mudlet the MUD client: Fix Committed

Bug description:
Please add this convenience function to the LuaGlobal.lua:


-- Replaces the given wildcard (as a number) with the given text.

-- Example: replaceWildcard(1, "hello") on a trigger of `^You wave (goodbye)\.$`
function replaceWildcard(what, replacement)
        if replacement == nil or what == nil then return end

        selectCaptureGroup(what)
        replace(replacement)
end

_______________________________________________
Mailing list: https://launchpad.net/~mudlet-makers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mudlet-makers
More help   : https://help.launchpad.net/ListHelp

Reply via email to