00001
00002
00003
00004
00005 #pragma once
00006
00007 #include <string>
00008 #include <vector>
00009 #include "File.h"
00010 #include "Types.h"
00011
00013 namespace MISC
00014 {
00015
00016
00018 std::string ReadFile(const MPMA::Filename &fname);
00020 bool LoadStringList(std::vector<std::string> &outList, const MPMA::Filename &file);
00022 std::string MakeLower(const std::string &str);
00024 std::string StripFirstLine(const std::string &str);
00026 std::string StripPadding(const std::string &str);
00028 uint CountBits(uint data);
00030 int GetHighestBit(uint data);
00032 void ExplodeString(const std::string &inData, std::vector<std::string> &outData, const std::string &inDeliminators=" \t\n");
00034 uint ParseHexString(const std::string &s);
00035 }
00036
00037
00038
00039
00040 inline double rndd() { return ((double)rand()/(double)RAND_MAX); }
00041 inline float rndf() { return ((float)rand()/(float)RAND_MAX); }