/**
 * This exercise aims to find all occurrences of characters in a given range within a string using loops.
 *
 * @param start The starting character of the range.
 * @param end The ending character of the range.
 * @param string The string to search within.
 * @return A list containing all characters from the range that are found in the string.
 *
 * Note: This exercise assumes the range is specified in ascending order.
 */
fun findCharInRange(start: Char, end: Char, string: String): List<Char> {

    val result = mutableListOf<Char>()

    // Find characters in the string that are within the given range
    for (char in string) {
        if (start <= char && char <= end) {
            result.add(char)
        }
    }

    return result
}
/**
 * This exercise aims to find all occurrences of characters in a given range within a string using loops.
 *
 * @param start The starting character of the range.
 * @param end The ending character of the range.
 * @param string The string to search within.
 * @return A list containing all characters from the range that are found in the string.
 *
 * Note: This exercise assumes the range is specified in ascending order.
 */
fun findCharInRange(start: Char, end: Char, string: String): List<Char> {
/**
 * This exercise aims to find all occurrences of characters in a given range within a string using loops.
 *
 * @param start The starting character of the range.
 * @param end The ending character of the range.
 * @param string The string to search within.
 * @return A list containing all characters from the range that are found in the string.
 *
 * Note: This exercise assumes the range is specified in ascending order.
 */
fun findCharInRange(start: Char, end: Char, string: String): List<Char> {

    val result = mutableListOf<Char>()

    // Find characters in the string that are within the given range
    for (char in string) {
        if (start <= char && char <= end) {
            result.add(char)
        }
    }

    return result
}