/**
 * The function compares two strings: string1 and string2.
 * It returns true if the strings are equal and false otherwise.
 *
 * Your task is to complete the code by implementing the comparison using the identity comparison operator.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return true if the strings are equal, false otherwise.
 */
fun compareStrings(string1: String, string2: String): Boolean {

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

    // Iterate through each character in the strings
    for (i in string1.indices) {
        // Compare the characters using the identity comparison operator
        if (string1[i] !== string2[i]) {
            return false
        }
    }

    // If all characters are equal, return true
    return true
}
/**
 * The function compares two strings: string1 and string2.
 * It returns true if the strings are equal and false otherwise.
 *
 * Your task is to complete the code by implementing the comparison using the identity comparison operator.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return true if the strings are equal, false otherwise.
 */
fun compareStrings(string1: String, string2: String): Boolean {
/**
 * The function compares two strings: string1 and string2.
 * It returns true if the strings are equal and false otherwise.
 *
 * Your task is to complete the code by implementing the comparison using the identity comparison operator.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return true if the strings are equal, false otherwise.
 */
fun compareStrings(string1: String, string2: String): Boolean {

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

    // Iterate through each character in the strings
    for (i in string1.indices) {
        // Compare the characters using the identity comparison operator
        if (string1[i] !== string2[i]) {
            return false
        }
    }

    // If all characters are equal, return true
    return true
}