API FindAndReplaceTags

From Vendetta Lua
Jump to navigationJump to search

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:
<source lang="lua">FindAndReplaceTags("hi this is a
linebreak", {br="\n"})
-> "hi this is a linebreak"</source>