static string string_join(const vector<string> &vs, const string &delim)
{
string s;
vector<string>::const_iterator citer = vs.begin();
while (citer != vs.end())
{
s += *citer;
if (++citer != vs.end())
{
s += delim;
}
}
return s;
}