unified snprintf