The new method allows to write into wxTextOutputStream anything that can be streamed into wxString and allows to simplify the existing code.