|
M5Utility 0.0.8 git rev:f3e2efe
|
Utilities for string. More...
#include <string>#include <cstdint>Go to the source code of this file.
Namespaces | |
| namespace | m5 |
| Top level namespace of M5. | |
Functions | |
| std::string | m5::utility::formatString (const char *fmt,...) |
| @ brief Create a string in a format similar to printf | |
Trim | |
| std::string & | m5::utility::trimRight (std::string &s) |
| Trim right. | |
| std::string & | m5::utility::trimLeft (std::string &s) |
| Trim left. | |
| std::string & | m5::utility::trim (std::string &s) |
| Trim both ends. | |
Convert | |
| template<bool Case = true> | |
| constexpr char | m5::utility::uintToHexChar (const uint8_t v) |
| Convert from 0~15 to hexadecimal character. | |
| template<typename T , bool Case = true> | |
| std::string | m5::utility::unsignedToHexString (const T &v) |
| Convert any one unsigned integer to a hexadecimal string. | |
Utilities for string.
| std::string & m5::utility::trimRight | ( | std::string & | s | ) |
Trim right.
|
constexpr |
Convert from 0~15 to hexadecimal character.
| Case | Capitalise if true |
| std::string m5::utility::unsignedToHexString | ( | const T & | v | ) |
Convert any one unsigned integer to a hexadecimal string.
| T | Value type (Must be unsigned integer) |