A command-line Pig Latin filter for Mac OS X.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A command-line Pig Latin filter for Mac OS X

I wrote this app mainly to demonstrate the enumerateSubstringsInRange:options:usingBlock: method in Cocoa.

Usage looks like this:

% piglatin
Please give me an apple
Easeplay ivegay emay anway appleway.

A couple of notes for developers

  • The program works in-place on a single NSMutableString. This is explicitly allowed by the aforementioned method.
  • Punctuation is handled correctly with no additional work. Think of all the edge and corner cases you used to have to nail down when searching for words in a string—now, you send one message, your block gets called with every word, and everything else remains undisturbed.