Words containing "the" substring: Difference between revisions
Content added Content deleted
m (→{{header|Smalltalk}}: forgot to mention dialect) |
(→{{header|Smalltalk}}: changed because the problem statement wasn't clear, but the discussions seems to imply that (sigh)) |
||
Line 669: | Line 669: | ||
{{works with|Smalltalk/X}} |
{{works with|Smalltalk/X}} |
||
<lang smalltalk>'unixdict.txt' asFilename contents |
<lang smalltalk>'unixdict.txt' asFilename contents |
||
select:[:word | (word size > 11) and:[word includesString:'the']] |
select:[:word | (word size > 11) and:[word includesString:'the' caseSensitive:trueOrFalseWhoKnows]] |
||
thenDo:#transcribeCR</lang> |
thenDo:#transcribeCR</lang> |
||
Line 680: | Line 680: | ||
((word := Stdin nextLine) size > 11 |
((word := Stdin nextLine) size > 11 |
||
and:[word includesString:'the'] |
and:[word includesString:'the' caseSensitive: trueOrFalseWhoKnows] |
||
) ifTrue:[ |
) ifTrue:[ |
||
Stdout nextPutLine: word |
Stdout nextPutLine: word |