Closed xrui94 closed 1 year ago
暂时不支持 format
. 不过可以直接使用 fastream
.
fastream s;
s << "hello " << 23 << " again";
s << co::maxdp(2) << 1.23456;
在 coost 中,fastring::cat()
或 str::cat()
可以将任意元素连接成一个字符串:
#include "co/str.h"
void f() {
auto s = str::cat("hello", 123, "again", 3.14);
s.cat(false, 99);
}
支持格式化字符串,而不再需要用sprintf,例如folly库中的这种用法: