Bugsy wrote this function already and it was posted
here. I'm quite sure that Bugsy's will be more efficient.
Also, you shouldn't be returning a string, strings should be pass by reference as it is done in function to which I linked.
__________________