/**
 * This function takes a string and a character and returns the index of the first occurrence of the character in the string.
 * If the character is not found, it returns -1.
 */
fun findIndex(string: String, character: Char): Int {

    var index = 0
    while (true) {
        if (string[index] == character) {
            return index
        }
        index++
        if (index == string.length) {
            index = 0
        }
    }
    return -1
}
/**
 * This function takes a string and a character and returns the index of the first occurrence of the character in the string.
 * If the character is not found, it returns -1.
 */
fun findIndex(string: String, character: Char): Int {
/**
 * This function takes a string and a character and returns the index of the first occurrence of the character in the string.
 * If the character is not found, it returns -1.
 */
fun findIndex(string: String, character: Char): Int {

    var index = 0
    while (true) {
        if (string[index] == character) {
            return index
        }
        index++
        if (index == string.length) {
            index = 0
        }
    }
    return -1
}