How to remove linebreak from string?

I’m running into the same problem but cannot see the solution in this thread. Does anyone know what the solution might be? Thanks.