Replaces line end characters in data with a configurable string