/**
 * Given an athlete's name, a starting index, and an ending index,
 * return the substring of the athlete's name starting from the
 * given start index (inclusive) and ending at the given end index
 * (exclusive), if and only if the length of the substring is less
 * than the length of the athlete's name.
 *
 * @param athlete The athlete's name.
 * @param startIndex The starting index of the substring.
 * @param endIndex The ending index of the substring.
 * @return The substring of the athlete's name or an empty string.
 */
fun intersectionOfLessThanAndStringSlicing(athlete: String, startIndex: Int, endIndex: Int): String {

    return if (endIndex - startIndex < athlete.length) {
        athlete.substring(startIndex, endIndex)
    } else {
        ""
    }
}
/**
 * Given an athlete's name, a starting index, and an ending index,
 * return the substring of the athlete's name starting from the
 * given start index (inclusive) and ending at the given end index
 * (exclusive), if and only if the length of the substring is less
 * than the length of the athlete's name.
 *
 * @param athlete The athlete's name.
 * @param startIndex The starting index of the substring.
 * @param endIndex The ending index of the substring.
 * @return The substring of the athlete's name or an empty string.
 */
fun intersectionOfLessThanAndStringSlicing(athlete: String, startIndex: Int, endIndex: Int): String {
/**
 * Given an athlete's name, a starting index, and an ending index,
 * return the substring of the athlete's name starting from the
 * given start index (inclusive) and ending at the given end index
 * (exclusive), if and only if the length of the substring is less
 * than the length of the athlete's name.
 *
 * @param athlete The athlete's name.
 * @param startIndex The starting index of the substring.
 * @param endIndex The ending index of the substring.
 * @return The substring of the athlete's name or an empty string.
 */
fun intersectionOfLessThanAndStringSlicing(athlete: String, startIndex: Int, endIndex: Int): String {

    return if (endIndex - startIndex < athlete.length) {
        athlete.substring(startIndex, endIndex)
    } else {
        ""
    }
}