utils.cpp
来自「日志解析」· C++ 代码 · 共 39 行
CPP
39 行
/*************************************************************************** revision : $Id: utils.cpp,v 1.1.1.1 2005/10/04 10:50:23 wiz Exp $ copyright : (C) 2005 by Simone Tellini email : tellini@users.sourceforge.net ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#include "utils.h"using namespace std;//---------------------------------------------------------------------------std::string Utils::Trim( std::string const& source, char const *delims ){ string result( source ); string::size_type index = result.find_last_not_of( delims ); if( index != string::npos ) result.erase( ++index ); index = result.find_first_not_of( delims ); if( index != string::npos ) result.erase( 0, index ); else result.erase(); return( result );}//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?