I was looking over the lua-users website a while back and came across this useful script that I've been using for some time. I felt it might be useful to share here so other people can find it useful too.
Both Ruby and Python have a short form for string formatting, using the % operator.
The following snippet adds a similar use of the mod operator to lua:
All you need to do is stick it in the scripts section somewhere.
Example usage:
In my personal opinion, it looks a bit nicer than having to regularly use string.format. I've also found it more convenient.