/**
 * This function takes a string and two indices as input and returns a portion of the string,
 * starting from the start index and ending at the end index (exclusive).
 *
 * @param string The string from which to extract the portion.
 * @param start The index of the first character to include in the portion.
 * @param end The index of the character to stop before in the portion.
 * @return The portion of the string specified by the given indices.
 */
fun chopString(string: String, start: Int, end: Int): String {

    var portion = ""  // Initializing an empty string to store the portion
    
    // Iterating over each character of the string
    for (char in string) {
        // Checking if the character index is within the specified range
        if (string.indexOf(char) >= start && string.indexOf(char) < end) {
            portion += char  // Adding the character to the portion
        }
    }
    
    return portion
}
/**
 * This function takes a string and two indices as input and returns a portion of the string,
 * starting from the start index and ending at the end index (exclusive).
 *
 * @param string The string from which to extract the portion.
 * @param start The index of the first character to include in the portion.
 * @param end The index of the character to stop before in the portion.
 * @return The portion of the string specified by the given indices.
 */
fun chopString(string: String, start: Int, end: Int): String {
/**
 * This function takes a string and two indices as input and returns a portion of the string,
 * starting from the start index and ending at the end index (exclusive).
 *
 * @param string The string from which to extract the portion.
 * @param start The index of the first character to include in the portion.
 * @param end The index of the character to stop before in the portion.
 * @return The portion of the string specified by the given indices.
 */
fun chopString(string: String, start: Int, end: Int): String {

    var portion = ""  // Initializing an empty string to store the portion
    
    // Iterating over each character of the string
    for (char in string) {
        // Checking if the character index is within the specified range
        if (string.indexOf(char) >= start && string.indexOf(char) < end) {
            portion += char  // Adding the character to the portion
        }
    }
    
    return portion
}