/**
 * This exercise involves concatenating two strings and then slicing the resulting string.
 * The function takes in two strings, 'string1" and 'string2`, and four indices, 'start1`, 'end1`, 'start2`, and 'end2`.
 * It returns a new string obtained by concatenating the two input strings and then slicing the resulting string
 * using the given indices.
 */
fun concatSliceStr(string1: String, string2: String, start1: Int, end1: Int, start2: Int, end2: Int): String {

    // Concatenating the two strings
    val concatenatedString = string1 + string2

    // Slicing the concatenated string
    val slicedString = concatenatedString.substring(start1, end1) + concatenatedString.substring(start2, end2)

    return slicedString
}
/**
 * This exercise involves concatenating two strings and then slicing the resulting string.
 * The function takes in two strings, 'string1" and 'string2`, and four indices, 'start1`, 'end1`, 'start2`, and 'end2`.
 * It returns a new string obtained by concatenating the two input strings and then slicing the resulting string
 * using the given indices.
 */
fun concatSliceStr(string1: String, string2: String, start1: Int, end1: Int, start2: Int, end2: Int): String {
/**
 * This exercise involves concatenating two strings and then slicing the resulting string.
 * The function takes in two strings, 'string1" and 'string2`, and four indices, 'start1`, 'end1`, 'start2`, and 'end2`.
 * It returns a new string obtained by concatenating the two input strings and then slicing the resulting string
 * using the given indices.
 */
fun concatSliceStr(string1: String, string2: String, start1: Int, end1: Int, start2: Int, end2: Int): String {

    // Concatenating the two strings
    val concatenatedString = string1 + string2

    // Slicing the concatenated string
    val slicedString = concatenatedString.substring(start1, end1) + concatenatedString.substring(start2, end2)

    return slicedString
}