Advanced Solution

Mainly to illustrate Lua's efficient string handling, and iterators.