| 2239 | |
| 2240 | template <class T> |
| 2241 | std::string WordToString(T value, ByteOrder order = BIG_ENDIAN_ORDER) |
| 2242 | { |
| 2243 | if (!NativeByteOrderIs(order)) |
| 2244 | value = ByteReverse(value); |
| 2245 | |
| 2246 | return std::string((char *)&value, sizeof(value)); |
| 2247 | } |
| 2248 | |
| 2249 | template <class T> |
| 2250 | T StringToWord(const std::string &str, ByteOrder order = BIG_ENDIAN_ORDER) |
no test coverage detected