/**
 * Given two strings, return the common characters between them.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return The common characters between string1 and string2.
 */
fun findCommonChars(string1: String, string2: String): String {

    var commonChars = ""

    // Iterate through each character in string1
    for (char1 in string1) {
        // Iterate through each character in string2
        for (char2 in string2) {
            // Check if the current characters match
            if (char1 == char2) {
                commonChars += char1
            }
        }
    }

    return commonChars
}
/**
 * Given two strings, return the common characters between them.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return The common characters between string1 and string2.
 */
fun findCommonChars(string1: String, string2: String): String {
/**
 * Given two strings, return the common characters between them.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return The common characters between string1 and string2.
 */
fun findCommonChars(string1: String, string2: String): String {

    var commonChars = ""

    // Iterate through each character in string1
    for (char1 in string1) {
        // Iterate through each character in string2
        for (char2 in string2) {
            // Check if the current characters match
            if (char1 == char2) {
                commonChars += char1
            }
        }
    }

    return commonChars
}