std::string print_collection(const V& input) {
  std::stringstream ss;
  ss << "[";
  for(auto i : input) ss << my_format(i) << ",";
  ss << "]";
  return ss.str();
}
Example #2
0
/* ---
*/
char *guess_file_format(char *fn)
{
        int i;
        int (*my_format)(char *);

        for (i = 0; i < format_count; i++) {
                my_format = fileformats[i].myformat;
                if (my_format && my_format(fn))
                        return fileformats[i].pattern;
        }
        return NULL;
}