/**
 * This function takes a title string and a library map as arguments.
 * It attempts to find the book with a title matching the provided string in the library.
 * If the book is found, it returns the book details as a string otherwise it returns "Book not found".
 *
 * @param title A string representing the title of the book to be searched for.
 * @param library A map representing the library where book details are stored.
 * @return A string representing the book details if found, otherwise "Book not found".
 */
fun findBookByTitle(title: String, library: Map<String, String>): String {

    for ((bookTitle, bookDetails) in library) {
        if (bookTitle.equals(title, ignoreCase = true)) {
            return bookDetails
        }
    }
    return "Book not found"
}
/**
 * This function takes a title string and a library map as arguments.
 * It attempts to find the book with a title matching the provided string in the library.
 * If the book is found, it returns the book details as a string otherwise it returns "Book not found".
 *
 * @param title A string representing the title of the book to be searched for.
 * @param library A map representing the library where book details are stored.
 * @return A string representing the book details if found, otherwise "Book not found".
 */
fun findBookByTitle(title: String, library: Map<String, String>): String {
/**
 * This function takes a title string and a library map as arguments.
 * It attempts to find the book with a title matching the provided string in the library.
 * If the book is found, it returns the book details as a string otherwise it returns "Book not found".
 *
 * @param title A string representing the title of the book to be searched for.
 * @param library A map representing the library where book details are stored.
 * @return A string representing the book details if found, otherwise "Book not found".
 */
fun findBookByTitle(title: String, library: Map<String, String>): String {

    for ((bookTitle, bookDetails) in library) {
        if (bookTitle.equals(title, ignoreCase = true)) {
            return bookDetails
        }
    }
    return "Book not found"
}