Building the Word Finder

The tool you are about to build, wordlasso, is a word-finding application that could be used to help you with crossword puzzles and other word-based games. The user will be able to execute it like so:

    % wordlasso -i la..o
    lacto
    Lanao
    Lango
    largo
    lasso
    latro

wordlasso will accept a few different options and will take as its argument a string template with periods for wildcards. It will produce a list of words that fit the provided template. In the example above, with the template la..o, the tool outputs a list of all five-letter words that begin with “la” and end in “o.” Note that in this example the search is not case sensitive – wordlasso will support both case-sensitive and case-insensitive searches.

In Xcode, create ...

Get Swift Programming: The Big Nerd Ranch Guide, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.