Unless you are wanting to do something very strange with these functions, I suspect that creating a filter plugin will do what you want.
General developer forum
weblib.php format_text and format_string
This discussion has been locked so you can no longer reply to it.