示例#1
0
		void SaveString(const char* filename, StringView data)
		{
			FILE* f = 0;
			fopen_s(&f, filename, "wb");
			if (!f)
			{
				ghlib::Log::Error("Could not open file `", filename, "`");
				return;
			}
			fwrite(data.begin(), data.size(), 1, f);
			fclose(f);
		}
示例#2
0
inline
size_t hash_value(StringView const& sv) {
    return boost::hash_range(sv.begin(), sv.end());
}