groovy

There should be a DGM.normalize(String) method which acts like readLines().join('\n')