Hi I\'m new in C# programming and just copied and pasted the CLR function from @Aaronaught\'s answer to use it in a SQL Server 2012:
https://stackoverflow.com/a/24520