42 #include "../Text/TextTools.h" 56 ifstream file(filename.c_str());
57 bool test = file ? true :
false;
66 ifstream file(path.c_str());
67 bool test = file ? true :
false;
76 ptrdiff_t end =
static_cast<ptrdiff_t
>(path.find_last_of(
"."));
77 ptrdiff_t begin =
static_cast<ptrdiff_t
>(path.find_last_of(dirSep) + 1);
80 if (begin > end)
return "";
84 result.erase(result.begin() + end, result.end());
85 result.erase(result.begin(), result.begin() + begin);
97 stream.open(filename.c_str(), std::ios::ate);
98 size = stream.tellg();
108 ptrdiff_t begin =
static_cast<ptrdiff_t
>(path.find_last_of(dirSep));
112 result.erase(result.begin() + begin, result.end());
122 size_t end = path.find_last_of(
".");
123 return path.substr(end + 1);
134 getline(input, s,
'\n');
144 if(in.eof())
return string(
"");
147 getline(in, temp,
'\n');
This class allows to perform a correspondence analysis.
static bool isEmpty(const std::string &s)
Tell if a string is empty.