Words containing "the" substring: Difference between revisions

Added Wren
No edit summary
(Added Wren)
Line 379:
32. weatherstripping
done...
</pre>
 
=={{header|Wren}}==
{{libheader|Wren-fmt}}
<lang ecmascript>import "io" for File
import "/fmt" for Fmt
 
var wordList = "unixdict.txt" // local copy
var words = File.read(wordList).trimEnd().split("\n").where { |w| w.count > 11 }.toList
var count = 0
System.print("Words containing 'the' having a length > 11 in %(wordList):")
for (word in words) {
if (word.contains("the")) {
count = count + 1
Fmt.print("$2d: $s", count, word)
}
}</lang>
 
{{out}}
<pre>
Words containing 'the' having a length > 11 in unixdict.txt:
1: authenticate
2: chemotherapy
3: chrysanthemum
4: clothesbrush
5: clotheshorse
6: eratosthenes
7: featherbedding
8: featherbrain
9: featherweight
10: gaithersburg
11: hydrothermal
12: lighthearted
13: mathematician
14: neurasthenic
15: nevertheless
16: northeastern
17: northernmost
18: otherworldly
19: parasympathetic
20: physiotherapist
21: physiotherapy
22: psychotherapeutic
23: psychotherapist
24: psychotherapy
25: radiotherapy
26: southeastern
27: southernmost
28: theoretician
29: weatherbeaten
30: weatherproof
31: weatherstrip
32: weatherstripping
</pre>
9,490

edits