
-----------------------------------
Vicous
Thu Apr 03, 2003 11:49 am

String manipulation
-----------------------------------
This code takes a sentence and capitolizes the letters of each word, try it!

var phrase, newPhrase : string := "" %the variables holding the unrevised and revised phrases
loop
    put "Enter your phrase, Enter exit to stop: " ..
    get phrase : *  %get the whole phrase
    exit when phrase = "exit"
    exit when phrase = "Exit"
    exit when phrase = "EXIT"  %sentinals to exit the loop

    for letter : 1 .. length (phrase)
        if letter = 1 then
            if phrase (letter .. letter) >= "a" and phrase (letter ..
                    letter) 