gimple-fold: Use ranges to simplify strncat and snprintf