| 220 | } |
| 221 | |
| 222 | string LoadFileToString(const char* filename) |
| 223 | { |
| 224 | //std::ifstream file(filename); |
| 225 | //return string((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); |
| 226 | uint32_t size; |
| 227 | uint8_t* buf = LoadFileToBuffer(filename, &size); |
| 228 | |
| 229 | if (buf) |
| 230 | { |
| 231 | string s(buf, buf+size); |
| 232 | delete[] buf; |
| 233 | |
| 234 | return s; |
| 235 | } |
| 236 | else |
| 237 | { |
| 238 | return ""; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | bool SaveStringToFile(const char* filename, const char* s) |
| 243 | { |
nothing calls this directly
no test coverage detected