common util library for C++
APACHE-2.0 License
@mainpage
Region | Platform | Source Code Repository URL |
---|---|---|
Mainland China | gitcode | https://gitcode.com/luoweifu1/common_util |
Mainland China | Gitee | https://gitee.com/spencer_luo/common_util |
International | Github | https://github.com/spencer-luo/common_util |
common_util is a general-purpose C++ utility library, include the following functions:
common_util is implemented in modern C++ syntax (C++11 and above), using cutl as the namespace. The naming convention of all interfaces is consistent with the STL, and it can be used as an extensions of C++ standard library. You can use common_util just like using the STL, For example:
// Data formatting
std::cout << "fmt_uint: " << cutl::fmt_uint(12, 5) << std::endl;
std::cout << "fmt_double: " << cutl::fmt_double(3.141592653, 4) << std::endl;
std::cout << "fmt_filesize: " << cutl::fmt_filesize(33600) << std::endl;
// Get the current system time
auto now = cutl::datetime::now();
std::cout << "current time(UTC time): " << now.utctime() << std::endl;
std::cout << "current time(local time): " << now.format() << std::endl;
This library has been tested and verified on the following platforms:
Operating System Platform and Version | C++ Compiler and Version | Testing Status | Remarks |
---|---|---|---|
Windows 10 | Visual Studio 2015 | tested | |
Ubuntu 20.04.4 | GNU GCC 9.4.0 | tested | |
macOS xxx | Clang version 15.0.0 | tested | |
Android | To be tested | ||
iOS | To be tested | ||
HarmonyOS | To be tested |
We welcome all developers who are interested in this project to join us, whether you are an experienced senior developer or a newcomer just starting out, we look forward to your participation. You can get involved in the project in the following ways:
If you have any questions or need help, please feel free to contact me through the following methods:
Email: [[email protected]]
Looking forward to your participation!
地区 | 代码托管平台 | 源码仓库地址 |
---|---|---|
中国大陆 | gitcode | https://gitcode.com/luoweifu1/common_util |
中国大陆 | Gitee | https://gitee.com/spencer_luo/common_util |
国际站点 | Github | https://github.com/spencer-luo/common_util |
common_util是C++的一个通用工具库,主要包含以下功能:
common_util采用现代C++语法(C++11及以上)实现,使用cutl作为命名空间,所有接口的命名方式与STL保持一致,可以作为STL库的一个补充。你可以像使用STL一样使用common_util,如:
// 数据格式化
std::cout << "fmt_uint: " << cutl::fmt_uint(12, 5) << std::endl;
std::cout << "fmt_double: " << cutl::fmt_double(3.141592653, 4) << std::endl;
std::cout << "fmt_filesize: " << cutl::fmt_filesize(33600) << std::endl;
// 获取系统当前时间
auto now = cutl::datetime::now();
std::cout << "current time(UTC time): " << now.utctime() << std::endl;
std::cout << "current time(local time): " << now.format() << std::endl;
本库在以下平台上测试验证过:
操作系统平台及版本 | C++编译器及版本 | 验证状态 | 备注 |
---|---|---|---|
Windows 10 | Visual Studio 2015 | 已验证 | |
Ubuntu 20.04.4 | GNU GCC 9.4.0 | 已验证 | |
macOS xxx | Clang version 15.0.0 | 已验证 | |
Android | 待验证 | ||
iOS | 待验证 | ||
HarmonyOS | 待验证 |
我们欢迎所有对此项目感兴趣的开发者加入我们,无论您是经验丰富的资深开发者,还是刚刚入门的新手,我们都期待您的参与。您可以通过以下方式参与到项目中:
如果您有任何疑问或需要帮助,欢迎通过以下方式联系我:
邮箱:[[email protected]]
期待你的参与!