doxygenated existing code
a function that changed a string in place then returned a copy of the string, which is redundant