
*=============================================================== * Copyright (C) 2013 All rights reserved. * * 文件名称:StringProcess.cpp * 创 建 者: * 创建日期:2013年04月24日 * 描 述: * 备 注: * 更新日志: * ================================================================*/ #include<stdio.h> #include<string.h> #include<stdlib.h> #include <sys/time.h> #include<ctype.h> #include<locale.h> #include "boost/regex.hpp" #include <iconv.h> #include <errno.h> #include<algorithm> // please add your code here! using namespace std; #define MAX_LINE_LENGTH 1048576 #define TAGLEN 50 /************************************************************ * @brief <funcName:trim> Author:刘禹 finallyly 20130425 去掉字符串首尾空格 ================================================== * @param s ================================================== **********************************************************/ void trim(char *s) { char *start; char *end; int len=strlen(s); start=s; end=s+len-1; while(1) { char c=*start; if(!isspace(c)) { break; } start++; if(start>end) { s[0]='