7 #include "../Text/TextTools.h" 21 ifstream file(filename.c_str());
22 bool test = file.good();
31 ifstream file(path.c_str());
32 bool test = file.good();
41 ptrdiff_t end =
static_cast<ptrdiff_t
>(path.find_last_of(
"."));
42 ptrdiff_t begin =
static_cast<ptrdiff_t
>(path.find_last_of(dirSep) + 1);
50 result.erase(result.begin() + end, result.end());
51 result.erase(result.begin(), result.begin() + begin);
63 stream.open(filename.c_str(), std::ios::ate);
64 size = stream.tellg();
74 ptrdiff_t begin =
static_cast<ptrdiff_t
>(path.find_last_of(dirSep));
78 result.erase(result.begin() + begin, result.end());
88 size_t end = path.find_last_of(
".");
89 return path.substr(end + 1);
100 getline(input, s,
'\n');
115 getline(in, temp,
'\n');
bool isEmpty(const std::string &s)
Tell if a string is empty. A string is considered to be 'empty' if it is only made of white spaces...