Implemented replace and splitlines