9 : std::ifstream (fileName.c_str())
12 std::string substring (
const unsigned int offset1,
const unsigned int offset2) {
13 unsigned int len = offset2 - offset1;
14 char * buffer =
new char [len+1];
20 std::string res (buffer);
23 return shorten_ (res, 42);
26 std::string line (
const unsigned int lineno) {
29 for (
unsigned int i=0 ; i<lineno ; ++i) {
30 std::getline (*
this, line);
37 static std::string shorten_ (
const std::string & s,
const unsigned int sizeMax) {
38 std::istringstream iss (s);
42 std::string res = word;
47 if (res.size() > sizeMax) {
48 res = res.substr(0, sizeMax-3);