Tests of newline utility functions from ``plib.stdlib``.

    >>> from plib.stdlib import fix_newlines, split_string
    >>> test_str = "Line 1.\nSTART..\nLine 2.\n..END\nLine 3."
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    'Line 1.\nSTART..\n'
    >>> b
    'Line 2.'
    >>> c
    '\n..END\nLine 3.'
    >>> test_str = "Line 1.\nSTART..\nLine 2a.\nLine 2b.\n..END\nLine 3."
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    'Line 1.\nSTART..\n'
    >>> b
    'Line 2a.\nLine 2b.'
    >>> c
    '\n..END\nLine 3.'
    >>> test_str = "START..\nLine 2.\n..END"
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    'START..\n'
    >>> b
    'Line 2.'
    >>> c
    '\n..END'
    >>> test_str = "START..\nLine.\n"
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    'START..\n'
    >>> b
    'Line.\n'
    >>> c
    ''
    >>> test_str = "START..\nLine."
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    'START..\n'
    >>> b
    'Line.'
    >>> c
    ''
    >>> test_str = "\nLine.\n..END"
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    ''
    >>> b
    '\nLine.'
    >>> c
    '\n..END'
    >>> test_str = "Line.\n..END"
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    ''
    >>> b
    'Line.'
    >>> c
    '\n..END'
    >>> test_str = "Line."
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    ''
    >>> b
    'Line.'
    >>> c
    ''
    >>> test_str = "START..Line...END"
    >>> a, b, c = split_string(test_str, '\n', "START", "END")
    >>> a
    ''
    >>> b
    'START..Line...END'
    >>> c
    ''
    >>> a, b, c = split_string(test_str, '\n', "START", "END", find_newlines=False)
    >>> a
    'START'
    >>> b
    '..Line...'
    >>> c
    'END'
    >>> test_str = "Line 1.\nLine 2.\nLine 3."
    >>> d = fix_newlines(test_str, '\r\n', '\n')
    >>> d
    'Line 1.\r\nLine 2.\r\nLine 3.'
    >>> test_str = "Line 1.\nLine 2.\nLine 3.\n"
    >>> d = fix_newlines(test_str, '\r\n', '\n')
    >>> d
    'Line 1.\r\nLine 2.\r\nLine 3.\r\n'
