Factored out conversion to string.