/**
 * In this exercise, you need to search for a specific tool in a given workshop inventory by breaking out of a loop.
 *
 * @param workshopInventory A list of tools available in the workshop.
 * @param toolName The name of the tool to be found.
 * @return The index position of the tool in the workshop inventory if found, or -1 if the tool is not present.
 */
fun findToolInWorkshop(workshopInventory: List<String>, toolName: String): Int {

    var toolIndex = -1

    for (i in workshopInventory.indices) {
        val currentTool = workshopInventory[i]

        if (currentTool == toolName) {
            toolIndex = i
            break
        }
    }

    return toolIndex
}

// Example usage
val workshopTools = listOf("hammer", "saw", "wrench", "drill", "screwdriver")
val desiredTool = "wrench"
val toolPosition = findToolInWorkshop(workshopTools, desiredTool)
/**
 * In this exercise, you need to search for a specific tool in a given workshop inventory by breaking out of a loop.
 *
 * @param workshopInventory A list of tools available in the workshop.
 * @param toolName The name of the tool to be found.
 * @return The index position of the tool in the workshop inventory if found, or -1 if the tool is not present.
 */
fun findToolInWorkshop(workshopInventory: List<String>, toolName: String): Int {
/**
 * In this exercise, you need to search for a specific tool in a given workshop inventory by breaking out of a loop.
 *
 * @param workshopInventory A list of tools available in the workshop.
 * @param toolName The name of the tool to be found.
 * @return The index position of the tool in the workshop inventory if found, or -1 if the tool is not present.
 */
fun findToolInWorkshop(workshopInventory: List<String>, toolName: String): Int {

    var toolIndex = -1

    for (i in workshopInventory.indices) {
        val currentTool = workshopInventory[i]

        if (currentTool == toolName) {
            toolIndex = i
            break
        }
    }

    return toolIndex
}

// Example usage
val workshopTools = listOf("hammer", "saw", "wrench", "drill", "screwdriver")
val desiredTool = "wrench"
val toolPosition = findToolInWorkshop(workshopTools, desiredTool)