C++boost字符串函数操作实现对字符串的trim

#include<iostream>
#include "common.h"
#include<string>
#include <ctype.h>
#include "Calendar.h"
#include <iostream>
#include<boost/date_time.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
using namespace boost::posix_time;
using namespace boost::gregorian;
using namespace std;
 
 
typedef struct tagPerson
{
	string name;
	int age;
}Person;
 
 
int main(int argc)
{	
 
	
	string name = "   zhangdong";
	string myName = trim_left_copy(name);
	cout << name << endl;          //输出   zhangdong
 
	cout << myName << endl;	       //输出zhangdong
	
	
	int wait;
	cin >> wait;
 
	return 0;
}
posted @ 2013-07-20 14:55  Predator  阅读(1040)  评论(0编辑  收藏  举报