Words containing "the" substring: Difference between revisions

Line 668:
=={{header|Smalltalk}}==
mhmm - I interpret the words "in this page" as to read the URL and fetch the page then search those words there...
Also, it was not clear to me if case matters or not.
 
{{works with|Smalltalk/X}}
<lang smalltalk>ddict := 'unixdict.txt' asFilename contents asSet.
page := 'https://www.rosettacode.org/wiki/Words_containing_%22the%22_substring' asURL retrieveContents.
page asCollectionOfWords
select:[:word |
select:[:word | (word size > 11) and:[word includesString:'the' caseSensitive:trueOrFalseWhoKnows]]
(dict includes:word)
and:[ (word size > 11)
select:[:word | (word size > 11) and:[ word includesString:'the' caseSensitive:trueOrFalseWhoKnows ]]]
thenDo:#transcribeCR</lang>
 
Anonymous user