#ifndef HELPER
#define HELPER
#include "apstring.h"
#include <vector>

apstring substring(apstring str, int index, int step);
   //returns a subset of STR, starting with INDEX and continuing for STEP places.
   //if STEP is positive, STEP will be the length of the returned string
   //if STEP is nonpositive, the returned string will start with INDEX and continue
   //until |STEP| characters from the end

double a2d(apstring str);
   //converts the digits in STR from character to a decimal format

void get_file_list(vector <apstring> &list, apstring folder);
   //runs system command "dir {folder}" and compiles list of files into LIST.

void get_file_list_unix(vector <apstring> &list, apstring folder);
   //runs system command "dir {folder}" and compiles list of files into LIST.

double hrconvert(int year, int month, int day, int hour, int min, int sec);
   //converts YY/MM/DD HH:MM:SS format into an absolute format, in number
   //of hours passed since 1/1/1970.

#endif
