| aString someWords|
aString := 'Now is the time for all good men to come to the aid of their blah blah blah'.
someWords := aString findTokens: ' '.
someWords indexOf: 'blah'.
"--> 16"
someWords replaceFrom: 1 to: 2 with: #('Then' 'was')
"--> OrderedCollection ('Then' 'was' 'the' 'time' 'for' 'all' 'good' 'men' 'to' 'come' 'to' 'the' 'aid' 'of' 'their' 'blah' 'blah' 'blah' )"
someWords copyReplaceAll: #('Now' 'is') with: #('Then' 'was' 'almost')
"--> OrderedCollection ('Then' 'was' 'almost' 'the' 'time' 'for' 'all' 'good' 'men' 'to' 'come' 'to' 'the' 'aid' 'of' 'their' 'blah' 'blah' 'blah' )"
Last modified at 7/24/97; 1:41:32 PM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | Papers | CS 2390 Spring '97 Home Page | STABLE | MMC-CaMILE