• Compares two strings line by line and logs the differences to the console. This function is useful for debugging purposes to identify discrepancies between two text inputs. It will print the total number of lines in each string, and for each line that differs, it will log the line number, the content of each line, and the first character difference along with its position and character codes.

    Parameters

    • str1: string
    • str2: string
    • logToConsole: boolean = true

    Returns string[]

    An array of strings representing the differences found between the two input strings. If array is empty, it means no differences were found.