Did you read the comments in the header of the UDF? It gives an example of how to use it. We even have a FAQ on how to use UDFs.

If you want us to help you, you need to provide more information. What do you get when you use it? What error is returned? What version @KiX? Show us the code you tried.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.