/**
 * This function takes a string of text and a word as input and returns a boolean value indicating whether the word
 * is present in the text.
 *
 * @param text The text in which the word needs to be searched.
 * @param word The word to be found in the text.
 * @return True if the word is found in the text, otherwise False.
 */
fun findWordInText(text: String, word: String): Boolean {

    for (index in text.indices) {
        val slicedText = text.substring(index)

        for (char in slicedText) {
            if (char == word[0]) {
                if (slicedText.length >= word.length && slicedText.substring(0, word.length) == word) {
                    return true
                }
            }
        }
    }
    return false
}
/**
 * This function takes a string of text and a word as input and returns a boolean value indicating whether the word
 * is present in the text.
 *
 * @param text The text in which the word needs to be searched.
 * @param word The word to be found in the text.
 * @return True if the word is found in the text, otherwise False.
 */
fun findWordInText(text: String, word: String): Boolean {
/**
 * This function takes a string of text and a word as input and returns a boolean value indicating whether the word
 * is present in the text.
 *
 * @param text The text in which the word needs to be searched.
 * @param word The word to be found in the text.
 * @return True if the word is found in the text, otherwise False.
 */
fun findWordInText(text: String, word: String): Boolean {

    for (index in text.indices) {
        val slicedText = text.substring(index)

        for (char in slicedText) {
            if (char == word[0]) {
                if (slicedText.length >= word.length && slicedText.substring(0, word.length) == word) {
                    return true
                }
            }
        }
    }
    return false
}