% sample8.t % string operations example % var sentence, word : string word := "easy" sentence := "This is pretty easy now that I understand." var location : int put "The sentence is:" put sentence put "It has ", length (sentence), " characters" location := index (sentence, word) put "The word ", word, " is found starting at character ", location % now let's remove the word from the sentence var new_sentence : string new_sentence = sentence (1 .. location - 1) + sentence (location + length (word) + 1 .. length (sentence)) put new_sentence