The function duplicates each character in a given string and returns the result.

