Adding sprintf implementation for easier use.