ABC words: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (Automated syntax highlighting fixup (second round - minor fixes)) |
|||
Line 3,003: | Line 3,003: | ||
=={{header|Vlang}}== |
=={{header|Vlang}}== |
||
<syntaxhighlight lang="vlang"> |
<syntaxhighlight lang="vlang"> |
||
import os |
|||
fn main() { |
fn main() { |
||
Line 3,009: | Line 3,010: | ||
mut text :='' |
mut text :='' |
||
unixdict := os.read_file('./unixdict.txt') or {panic('file not found')} |
unixdict := os.read_file('./unixdict.txt') or {panic('file not found')} |
||
for word in unixdict. |
for word in unixdict.split_into_lines() { |
||
if word.contains('a') |
if word.contains('a') |
||
&& word.index_any('a') < word.index_any('b') |
|||
&& word.index_any('b') < word.index_any('c') { |
|||
text += count++.str() + ': $word \n' |
text += count++.str() + ': $word \n' |
||
} |
} |