/**
 * Write a function that takes a string as input and returns the count of unique characters
 * present in the string. The function should use a loop to iterate through each character
 * in the string and a boolean function to check if the character is already present in the
 * unique characters list or not. The function should return an integer representing the count
 * of unique characters.
 */
fun countUniqueChars(string: String): Int {

    val uniqueChars = mutableListOf<Char>()

    for (char in string) {
        if (checkIfUnique(char, uniqueChars)) {
            uniqueChars.add(char)
        }
    }

    return uniqueChars.size
}

fun checkIfUnique(char: Char, uniqueChars: List<Char>): Boolean {
    return char !in uniqueChars
}
/**
 * Write a function that takes a string as input and returns the count of unique characters
 * present in the string. The function should use a loop to iterate through each character
 * in the string and a boolean function to check if the character is already present in the
 * unique characters list or not. The function should return an integer representing the count
 * of unique characters.
 */
fun countUniqueChars(string: String): Int {
/**
 * Write a function that takes a string as input and returns the count of unique characters
 * present in the string. The function should use a loop to iterate through each character
 * in the string and a boolean function to check if the character is already present in the
 * unique characters list or not. The function should return an integer representing the count
 * of unique characters.
 */
fun countUniqueChars(string: String): Int {

    val uniqueChars = mutableListOf<Char>()

    for (char in string) {
        if (checkIfUnique(char, uniqueChars)) {
            uniqueChars.add(char)
        }
    }

    return uniqueChars.size
}

fun checkIfUnique(char: Char, uniqueChars: List<Char>): Boolean {
    return char !in uniqueChars
}