/**
 * Given two strings, concatenate them and if the resulting string has more than 10 characters, return it.
 * Otherwise, return "String too short".
 *
 * Example:
 * concatenateStringsCheckLength("Hello", "World") -> "HelloWorld"
 * concatenateStringsCheckLength("Python", "is awesome") -> "Pythonis awesome"
 * concatenateStringsCheckLength("Hello", "Jina AI") -> "String too short"
 */
fun concatenateStringsCheckLength(string1: String, string2: String): String {

    val result = string1 + string2

    if (result.length > 10) {
        if (string2.contains("AI")) {
            return result + "ML"
        }
        return result
    } else {
        return "String too short"
    }
}

// Exercise:
// Fix the nested if statements to handle an extra condition: if string2 contains "AI", append "ML" at the end of the
// resulting string.
// For example, if string1 = "Hello" and string2 = "Jina AI", the resulting string should be "HelloJina AIML".
/**
 * Given two strings, concatenate them and if the resulting string has more than 10 characters, return it.
 * Otherwise, return "String too short".
 *
 * Example:
 * concatenateStringsCheckLength("Hello", "World") -> "HelloWorld"
 * concatenateStringsCheckLength("Python", "is awesome") -> "Pythonis awesome"
 * concatenateStringsCheckLength("Hello", "Jina AI") -> "String too short"
 */
fun concatenateStringsCheckLength(string1: String, string2: String): String {
/**
 * Given two strings, concatenate them and if the resulting string has more than 10 characters, return it.
 * Otherwise, return "String too short".
 *
 * Example:
 * concatenateStringsCheckLength("Hello", "World") -> "HelloWorld"
 * concatenateStringsCheckLength("Python", "is awesome") -> "Pythonis awesome"
 * concatenateStringsCheckLength("Hello", "Jina AI") -> "String too short"
 */
fun concatenateStringsCheckLength(string1: String, string2: String): String {

    val result = string1 + string2

    if (result.length > 10) {
        if (string2.contains("AI")) {
            return result + "ML"
        }
        return result
    } else {
        return "String too short"
    }
}

// Exercise:
// Fix the nested if statements to handle an extra condition: if string2 contains "AI", append "ML" at the end of the
// resulting string.
// For example, if string1 = "Hello" and string2 = "Jina AI", the resulting string should be "HelloJina AIML".