Triple quoted strings are very useful in unit tests. But there is a problem when you create the expected value with triple quoted strings and the actual value is for example produced by a writer. On windows the two values are not equal, as triple quoted strings use always '\' as the line separator. I don't know the reason why triple quoted strings behave like. But it would be nice to have a straight forward way to turn a triple quoted String into its platform specific form. The PlatformLineWriter is offering such a functionality, but it is obviously not that straightforward to use it. Therefore I propose to have a new method for the GDK String API that does what PlatformLineWriter does: gobbles any \r characters and replaces every \n with a platform specific newline.
There is now a DGM.normalize(String) method. Do you think that would be sufficient? In the scenario above you would normalize what the writer gave you then compare it to the expected. The alternative would be to also provide a DGM.denormalize(String) method.