/**
 * Given a string and a character, count the number of occurrences of that character in the string.
 *
 * @param string The string to search for occurrences.
 * @param char The character to count occurrences of.
 * @return The number of occurrences of the character in the string.
 */
fun countOccurrences(string: String, char: Char): Int {

    var count = 0
    for (i in string.indices) {
        if (string[i] == char) {
            count++
        }
    }
    return count
}
/**
 * Given a string and a character, count the number of occurrences of that character in the string.
 *
 * @param string The string to search for occurrences.
 * @param char The character to count occurrences of.
 * @return The number of occurrences of the character in the string.
 */
fun countOccurrences(string: String, char: Char): Int {
/**
 * Given a string and a character, count the number of occurrences of that character in the string.
 *
 * @param string The string to search for occurrences.
 * @param char The character to count occurrences of.
 * @return The number of occurrences of the character in the string.
 */
fun countOccurrences(string: String, char: Char): Int {

    var count = 0
    for (i in string.indices) {
        if (string[i] == char) {
            count++
        }
    }
    return count
}