Closed youyuanshanren closed 12 months ago
经常遇到的是 void output(const char* format, ...) 这种类型的函数,含有不定参数,如果不使用vsnprintf 这类的参数,如何快速转换为faststring 或者 fastream 类型呢
fastring::cat() 或 fastream::cat() 可以接受任意数量的参数
fastring::cat()
fastream::cat()
cat()函数似乎不能格式化字符串啊?如何能够做到类似sprintf的功能呢?
用 cat 随便拼接,要啥格式化
cat
fastring s; s << "hello " << 23; s.cat("hello ", 23, ' ', false);
经常遇到的是 void output(const char* format, ...) 这种类型的函数,含有不定参数,如果不使用vsnprintf 这类的参数,如何快速转换为faststring 或者 fastream 类型呢