/**
 * This function takes two strings as input and returns a new string resulting from subtracting characters of string2 from string1.
 * It does this by continuously checking each character in string1 to see if it is present in string2.
 */
fun subtractCharacters(string1: String, string2: String): String {

    var result = ""
    for (char1 in string1) {
        var found = false
        for (char2 in string2) {
            if (char2 == char1) {
                found = true
                break
            }
        }
        if (!found) {
            result += char1
        }
    }
    return result
}

// Exercise 1: Find the number of occurrences of a character
/**
 * This function takes two strings as input and returns a new string resulting from subtracting characters of string2 from string1.
 * It does this by continuously checking each character in string1 to see if it is present in string2.
 */
fun subtractCharacters(string1: String, string2: String): String {
/**
 * This function takes two strings as input and returns a new string resulting from subtracting characters of string2 from string1.
 * It does this by continuously checking each character in string1 to see if it is present in string2.
 */
fun subtractCharacters(string1: String, string2: String): String {

    var result = ""
    for (char1 in string1) {
        var found = false
        for (char2 in string2) {
            if (char2 == char1) {
                found = true
                break
            }
        }
        if (!found) {
            result += char1
        }
    }
    return result
}

// Exercise 1: Find the number of occurrences of a character