Added the function to copy attributed string

Added the function to copy attributed string