Repository Details
Shared by


HelloGitHub Rating
0 ratings
Claim
Discuss
Collect
Share
22.3k
Stars
No
Chinese
C++
Language
Yes
Active
517
Contributors
14
Issues
Yes
Organization
11.2.0
Latest
3k
Forks
None
License
More
这是一个开源的 C++ 格式库。它可以作为 (s)printf 和 iostreams 的安全和快速替代品,也是 C++ 20 中 std::format 的一个实现。它的格式化字符串语法类似于 Python 中的 `str.format`,支持用户自己定义的类型,还比 printf 和 iostreams 的常见标准库实现更快!而且 fmt 还非常安全,格式字符串中的错误可以在编译时报告,还可以防止缓冲区溢出错误。示例代码:
```c++
fmt::print("Hello, {}!", "world"); // 类 Python 的语法风格
fmt::printf("Hello, %s!", "world");
```
Included in:
Vol.41
Comments
Rating:
No comments yet