Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

stringutils.h

Go to the documentation of this file.
00001 /*
00002 * stringutils.h -- C++ STL string functions
00003 * Copyright (C) 2003-2007 Dan Dennedy <dan@dennedy.org>
00004 *
00005 * This program is free software; you can redistribute it and/or modify
00006 * it under the terms of the GNU General Public License as published by
00007 * the Free Software Foundation; either version 2 of the License, or
00008 * (at your option) any later version.
00009 *
00010 * This program is distributed in the hope that it will be useful,
00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 * GNU General Public License for more details.
00014 *
00015 * You should have received a copy of the GNU General Public License
00016 * along with this program; if not, write to the Free Software Foundation,
00017 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 *
00019 */
00020 
00021 #ifndef _STRINGUTILS_H
00022 #define _STRINGUTILS_H
00023 
00024 #include <string>
00025 #include <vector>
00026 using std::string;
00027 using std::vector;
00028 
00029 class StringUtils
00030 {
00031 public:
00032     static string replaceAll ( string haystack, string needle, string s );
00033     static string stripWhite ( string s );
00034     static bool begins ( string source, string sub );
00035     static bool ends ( string source, string sub );
00036     static string itos ( int num );
00037     static string ltos ( long num );
00038     static int split( const string &input, const string &delimiter, vector< string > &items, const bool clean = true );
00039     static string join( vector< string >&items, const string &delimiter );
00040 };
00041 
00042 #endif
00043 

Generated on Sun Mar 11 22:11:47 2007 for Kino by  doxygen 1.4.2