June 2017
Intermediate to advanced
873 pages
18h 9m
English
In this recipe, we demonstrate how to search for certain words in a text file. You can find the code in the search.dart script in the project searching_file. As an example text file, we use taoprog.txt.
The program is launched from the command-line in the bin folder (or in Dart Editor with a Managed Launch with Script argum
ents -n search1 search2taoprog.txt) as shown in the following screenshot:

In dart searc
h.dart -n search1 search2 taoprog.txt , where search1 and search2 are words to be searched for, there can be one or more search words. For example, let's search for mysterious and machine, in which case, the ...
Read now
Unlock full access