| 141 | // Converts an integer type to a string in hexidecimal notation. |
| 142 | // Width can be set but defaults to 6. |
| 143 | template <typename T> inline std::string inttohex(T i, int width = 6) |
| 144 | { |
| 145 | std::string s; |
| 146 | std::stringstream str; |
| 147 | str << std::hex << std::showbase << std::internal << std::setfill('0') << std::setw(width) << i; |
| 148 | str >> s; |
| 149 | |
| 150 | //alternative: |
| 151 | //String str = AnsiString::IntToHex(i,6); |
| 152 | //s = str.c_str(); |
| 153 | |
| 154 | return s; |
| 155 | } |
| 156 | |
| 157 | // NOTE: Below is deprecated in C17, but valid until a replacement is introduced |
| 158 | std::wstring CORE_EXPORT stringToWideString(const std::string& string); |
nothing calls this directly
no outgoing calls
no test coverage detected