Snippets #1

I’ll start my blog by posting a couple of useful helpers. The first one lets you count the items of an array that may have duplicates:

This second snippet lets you format a string similar to printf:

Leave a Reply

Your email address will not be published. Required fields are marked *