Correct output for unary operation on strings