/**
 * Determine if two strings are exactly the same using a while loop and identity comparison.
 *
 * @param string1 The first string to be compared.
 * @param string2 The second string to be compared.
 * @return True if the two strings are exactly the same, False otherwise.
 */
fun compareStrings(string1: String, string2: String): Boolean {

    // Initialize index counter
    var i = 0

    // Check if the lengths of the strings are different
    if (string1.length != string2.length) {
        return false
    }

    // Loop through each character of both strings simultaneously
    while (i < string1.length) {
        // Check if the characters at the current index are not the same
        if (string1[i] !== string2[i]) {
            return false
        }
        // Increment index counter
        i++
    }

    // Return True if the loop completes without any differences found
    return true
}
/**
 * Determine if two strings are exactly the same using a while loop and identity comparison.
 *
 * @param string1 The first string to be compared.
 * @param string2 The second string to be compared.
 * @return True if the two strings are exactly the same, False otherwise.
 */
fun compareStrings(string1: String, string2: String): Boolean {
/**
 * Determine if two strings are exactly the same using a while loop and identity comparison.
 *
 * @param string1 The first string to be compared.
 * @param string2 The second string to be compared.
 * @return True if the two strings are exactly the same, False otherwise.
 */
fun compareStrings(string1: String, string2: String): Boolean {

    // Initialize index counter
    var i = 0

    // Check if the lengths of the strings are different
    if (string1.length != string2.length) {
        return false
    }

    // Loop through each character of both strings simultaneously
    while (i < string1.length) {
        // Check if the characters at the current index are not the same
        if (string1[i] !== string2[i]) {
            return false
        }
        // Increment index counter
        i++
    }

    // Return True if the loop completes without any differences found
    return true
}