- // Skip whitespace. There should be a better way to do this, but
- // I don't know how...
- while(isspace(uip.get()));
- uip.unget();
+ // Reads until end of line and left trim white space
+ getline(uip, token);
+ token.erase(0, token.find_first_not_of(" \n\r\t"));