/******************************************* * Read Functionality ******************************************* */ static void skip_spaces(File* file) { while(isspace(*file->buffer) && !__eof(file)) { __get_text(file); } }
str * StringI::readline(int n) { __check_closed(); if(__eof()) return new str(""); size_t nl = s->unit.find('\n', pos); if(nl != std::string::npos) { int tbr = nl - pos + 1; return read(n < 0 ? tbr : std::min(tbr, n)); } else { return read(n); } }