/**
 * Given a list of client names and a specific client name,
 * this function returns the index of the client if found, else returns -1.
 *
 * @param nameList The list of client names.
 * @param clientName The specific client name to search for.
 * @return The index of the client in the list if found, else -1.
 */
fun findClientIndex(nameList: List<String>, clientName: String): Int {

    return try {
        nameList.indexOf(clientName)
    } catch (e: NoSuchElementException) {
        -1
    }
}
/**
 * Given a list of client names and a specific client name,
 * this function returns the index of the client if found, else returns -1.
 *
 * @param nameList The list of client names.
 * @param clientName The specific client name to search for.
 * @return The index of the client in the list if found, else -1.
 */
fun findClientIndex(nameList: List<String>, clientName: String): Int {
/**
 * Given a list of client names and a specific client name,
 * this function returns the index of the client if found, else returns -1.
 *
 * @param nameList The list of client names.
 * @param clientName The specific client name to search for.
 * @return The index of the client in the list if found, else -1.
 */
fun findClientIndex(nameList: List<String>, clientName: String): Int {

    return try {
        nameList.indexOf(clientName)
    } catch (e: NoSuchElementException) {
        -1
    }
}