Homepage Demos Overview Downloads Tutorials Reference
Credits

string_util.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_string_util_h
00003 #define INCLUDED_string_util_h
00004 
00005 #include <string>
00006 #include <vector>
00007 
00008 //! some common string processing functions, for std::string
00009 namespace string_util {
00010   //! returns lower case version of @a s
00011   std::string makeLower(const std::string& s);
00012 
00013   //! returns upper case version of @a s
00014   std::string makeUpper(const std::string& s);
00015 
00016   //! returns @a str with @a pre removed - if @a pre is not fully matched, @a str is returned unchanged
00017   std::string removePrefix(const std::string& str, const std::string& pre);
00018   
00019   //! parses the input string into an arg list, with corresponding offsets of each arg in the original input
00020   bool parseArgs(const std::string& input, std::vector<std::string>& args, std::vector<unsigned int>& offsets); 
00021 };
00022 
00023 /*! @file
00024  * @brief Describes some useful functions for string manipulation in the string_util namespace
00025  * @author ejt (Creator)
00026  *
00027  * $Author: ejt $
00028  * $Name: tekkotsu-2_2_2 $
00029  * $Revision: 1.3 $
00030  * $State: Exp $
00031  * $Date: 2004/12/23 01:47:07 $
00032  */
00033 
00034 #endif

Tekkotsu v2.2.2
Generated Tue Jan 4 15:43:15 2005 by Doxygen 1.4.0