/*
#define SB_HELPER() \
  if (sb->allocated < max_array_size(*sb)) {  \
    array_reserve(*sb, max_array_size(*sb));  \
  }                                           \
  s64 buffer_size = sb->allocated - sb->count;\
  u8* current_point = &sb->data[sb->count]

// This is not super flexible because we cannot do leading zeros or align...
template <typename T> // Base-10 
string int_to_string(String_Builder* sb, T value, s32 width, bool is_signed) {
  SB_HELPER();
  
  string result;
  bool negative = false;
  u8 temporary_buffer[32];
  s32 position = 0;
  u64 v = 0;
  
  if (is_signed && value < 0) {
    negative = true;
    // convert to unsigned magnitude safely
    v = (u64)(-(s64)value);
  } else {
    v = (u64)value;
  }
  
  // Special case 0:
  if (v == 0) {
      
  }
}


force_inline void print_to_builder (String_Builder* sb, u8 v) {
  SB_HELPER();
  return int_to_string(v, 8, is_signed=false);
}

force_inline void print_to_builder (String_Builder* sb, string v) {
    
    sb->count += v.count;
}


// fallback:
template <typename T>
force_inline string print_to_builder (String_Builder* sb, T&) {
  return string("[unsupported type for to_builder conversion!]");
}

*/