Return a string from the function instead of copying it