Utility functions I use frequently when programming in C