/**
 * This function takes a text, start, and end as input and returns the text with the characters in the given range capitalized.
 */
fun capitalizeTextWithinRange(text: String, start: Int, end: Int): String {

    // Check if the start index is less than or equal to the end index
    if (start <= end) {
        // Check if the end index is within the range of the text
        if (end < text.length) {
            // Convert the characters within the range to uppercase
            val capitalizedText = text.substring(0, start) + text.substring(start, end + 1).toUpperCase() + text.substring(end + 1)
            return capitalizedText
        } else {
            return "End index"
        }
    } else {
        return "Start index is greater than end index"
    }
}
/**
 * This function takes a text, start, and end as input and returns the text with the characters in the given range capitalized.
 */
fun capitalizeTextWithinRange(text: String, start: Int, end: Int): String {
/**
 * This function takes a text, start, and end as input and returns the text with the characters in the given range capitalized.
 */
fun capitalizeTextWithinRange(text: String, start: Int, end: Int): String {

    // Check if the start index is less than or equal to the end index
    if (start <= end) {
        // Check if the end index is within the range of the text
        if (end < text.length) {
            // Convert the characters within the range to uppercase
            val capitalizedText = text.substring(0, start) + text.substring(start, end + 1).toUpperCase() + text.substring(end + 1)
            return capitalizedText
        } else {
            return "End index"
        }
    } else {
        return "Start index is greater than end index"
    }
}