// util.cc
// Neil Moore
// 7 October 1998

#include "util.h"

#include <iostream>
#include <cctype>
#include <string>

using namespace std;

void stripws(string &str) 
{
	unsigned last_nonws;
	
	str.erase(0,str.find_first_not_of(" \t"));
	last_nonws = str.find_last_not_of(" \t");
	if(last_nonws < str.length()-1)
		str.erase(last_nonws+1);
}

void lowercasify(string &str) 
{
	for(unsigned i=0; i<str.length(); i++)
		str[i] = tolower(str[i]);
}


