#include "libscl.h"

using namespace std;
using namespace scl;

int main(int argc, char** argp, char** envp)
{

  vector<string> arguments;
  vector<string> environment;

  char** strptr = argp;
  for (int i=0; i<argc; ++i) {
    arguments.push_back(*strptr++);
  }

  strptr = envp;
  while (*strptr) {
    environment.push_back(*strptr++);
  }

    const char* cstr0 = "";
    const char* cstr1 = " one blank";
    const char* cstr2 = "  two blanks";
    const char* cstr3 = "   three blanks";

    char str0[128]; 
    char str1[128]; 
    char str2[128]; 
    char str3[128]; 

    strcpy(str0,cstr0);
    strcpy(str1,cstr1);
    strcpy(str2,cstr2);
    strcpy(str3,cstr3);
    
    string sstr0(cstr0);
    string sstr1(cstr1);
    string sstr2(cstr2);
    string sstr3(cstr3);

    cout << '|' << cstr0 << '|' << eatwhite(cstr0) << '|' << '\n';
    cout << '|' << cstr1 << '|' << eatwhite(cstr1) << '|' << '\n';
    cout << '|' << cstr2 << '|' << eatwhite(cstr2) << '|' << '\n';
    cout << '|' << cstr3 << '|' << eatwhite(cstr3) << '|' << '\n';

    cout << '|' << str0 << '|' << eatwhite(str0) << '|' << '\n';
    cout << '|' << str1 << '|' << eatwhite(str1) << '|' << '\n';
    cout << '|' << str2 << '|' << eatwhite(str2) << '|' << '\n';
    cout << '|' << str3 << '|' << eatwhite(str3) << '|' << '\n';

    cout << '|' << sstr0 << '|' << eatwhite(sstr0) << '|' << '\n';
    cout << '|' << sstr1 << '|' << eatwhite(sstr1) << '|' << '\n';
    cout << '|' << sstr2 << '|' << eatwhite(sstr2) << '|' << '\n';
    cout << '|' << sstr3 << '|' << eatwhite(sstr3) << '|' << '\n';

  return 0;
}
