Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
string_util.hGo 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 //! removes whitespace (as defined by isspace()) from the beginning and end of @a str, and returns the result 00020 std::string trim(const std::string& str); 00021 00022 //! parses the input string into an arg list, with corresponding offsets of each arg in the original input 00023 bool parseArgs(const std::string& input, std::vector<std::string>& args, std::vector<unsigned int>& offsets); 00024 }; 00025 00026 /*! @file 00027 * @brief Describes some useful functions for string manipulation in the string_util namespace 00028 * @author ejt (Creator) 00029 * 00030 * $Author: ejt $ 00031 * $Name: tekkotsu-2_4_1 $ 00032 * $Revision: 1.4 $ 00033 * $State: Exp $ 00034 * $Date: 2005/06/01 05:47:49 $ 00035 */ 00036 00037 #endif |
Tekkotsu v2.4.1 |
Generated Tue Aug 16 16:32:49 2005 by Doxygen 1.4.4 |