/**
 * This function takes two strings as input and returns the intersection of characters in both strings.
 *
 * @param str1 The first input string.
 * @param str2 The second input string.
 * @return The intersection of characters in both strings.
 */
fun intersectionOfStrings(str1: String, str2: String): String {

    // Initialize an empty string to store the intersection
    var intersection = ""

    // Iterate over each character in the first string
    for (char in str1) {
        // Check if the character is present in both strings
        if (char in str2 && char !in intersection) {
            // Append the character to the intersection string
            intersection += char
        }
    }

    return intersection
}
/**
 * This function takes two strings as input and returns the intersection of characters in both strings.
 *
 * @param str1 The first input string.
 * @param str2 The second input string.
 * @return The intersection of characters in both strings.
 */
fun intersectionOfStrings(str1: String, str2: String): String {
/**
 * This function takes two strings as input and returns the intersection of characters in both strings.
 *
 * @param str1 The first input string.
 * @param str2 The second input string.
 * @return The intersection of characters in both strings.
 */
fun intersectionOfStrings(str1: String, str2: String): String {

    // Initialize an empty string to store the intersection
    var intersection = ""

    // Iterate over each character in the first string
    for (char in str1) {
        // Check if the character is present in both strings
        if (char in str2 && char !in intersection) {
            // Append the character to the intersection string
            intersection += char
        }
    }

    return intersection
}