message: added swoole_string_format
diff: #include "swoole.h"
  #include "atomic.h"
  +#include <stdarg.h>
  #include <sys/stat.h>
  #include <sys/resource.h>
  #include <sys/ioctl.h>
  @@ -1107,6 +1108,26 @@ int swoole_shell_exec(char *command, pid_t *pid)
  return fds[SW_PIPE_READ];
  }
  +char* swoole_string_format(size_t n, const char *format, ...)
  +{
  + char *buf = sw_malloc(n);
  + if (buf == NULL)
  + {
  + return NULL;
  + }
  +
  + va_list _va_list;
  + va_start(_va_list, format);
  +
  + if (vsnprintf(buf, n, format, _va_list) < 0)
  + {
  + sw_free(buf);
  + return NULL;
  + }
  +
  + return buf;
  +}
  +
  #ifdef HAVE_EXECINFO
  void swoole_print_trace(void)
  {
  