def splitLines (text: str) -> list:
    """
    Split string into single lines, retaining also empty ones.
    """
    lastEntry = 0
    elements = []
    strLen = len (text)
    for i in range (0, strLen):
        if text[i] == "\n":
            elements.append (text[lastEntry : i])
            lastEntry = i + 1
    if len (text) >= lastEntry:
        elements.append (text[lastEntry : len (text)])
    return elements