Difference between revisions of "API FindAndReplaceTags"

From Vendetta Lua
Jump to: navigation, search
(split)
 
(No difference)

Latest revision as of 21:58, 25 January 2009

FindAndReplaceTags

Definition:
FindAndReplaceTags(string text, table matches) -> string ret1
Description:
Replaces all occurances of with < and > enclosed substrings in text with matching values from the provided table
Arguments:
test string to replace tags in
matches table with tags/replacement pairs
Returns:
ret1: converted text
Example:

FindAndReplaceTags("hi this is a<br>linebreak", {br="\n"})<br>
-> "hi this is a
linebreak"