/build/buildd/libassa-3.4.1/assa/CommonUtils.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 // $Id: CommonUtils.h,v 1.7 2005/10/10 02:27:48 vlg Exp $
00004 //------------------------------------------------------------------------------
00005 //                             CommonUtils.h
00006 //------------------------------------------------------------------------------
00007 //  Copyright (C) 1997-2003,2005  Vladislav Grinchenko
00008 //
00009 //  This library is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU Library General Public
00011 //  License as published by the Free Software Foundation; either
00012 //  version 2 of the License, or (at your option) any later version.
00013 //------------------------------------------------------------------------------
00014 #ifndef COMMON_UTILS_H
00015 #define COMMON_UTILS_H
00016 
00017 #include <sstream>
00018 
00019 #include <string> 
00020 #include <vector>
00021 using std::vector;
00022 using std::string;
00023 
00029 namespace ASSA {
00030 namespace Utils {
00031 
00040     void split (const char* text_, std::vector<std::string>& vec_);
00041 
00052     int split_pair (const string& text_, char sep_, string& lhs_, string& rhs_);
00053 
00062     int ltrim (std::string& text_, const std::string& delim_);
00063 
00073     int rtrim (std::string& text_, const std::string& delim_);
00074 
00081     void trim_sides (std::string& text_);
00082 
00091     void find_and_replace_char (std::string& text_, char src_, char dest_);
00092 
00101     std::string strenv (const char* in_);
00102 
00109     std::string get_cwd_name ();
00110 
00111 
00112 } // end namespace Utils
00113 } // end namespace ASSA
00114 
00115 #endif /* COMMON_UTILS_H */  

Generated on Thu Jun 22 12:39:20 2006 for libassa by  doxygen 1.4.6