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

PhxString.h

Go to the documentation of this file.
00001 #ifndef PHX_STRING_H
00002 #define PHX_STRING_H
00003 
00004 #include <string>
00005 
00013 namespace Phx {
00014 
00021   class String : public std::string {
00022   public:
00023 
00034     const static String NULL_STRING;
00035     
00036     String() {}
00037     String(const char* str) : std::string(str) {}
00038     String(const String& str) : std::string(str) {}
00039     String(const std::string& str) : std::string(str) {}
00040     
00047     bool endsWith(const String& str) const {
00048       if (str.size() > size()) return false;
00049       return (compare(size()-str.size(), str.size(), str) == 0);
00050     }
00051 
00058     bool startsWith(const String& str) const {
00059       if (str.size() > size()) return false;
00060       return (compare(0, str.size(), str) == 0);
00061     }
00062 
00063     virtual ~String() {}
00064   };
00065 
00066   
00067 }; // namespace Phx
00068 
00069 #endif /* PHX_STRING_H */

Generated on Mon Jul 10 19:45:28 2006 for Phoenix OSFS by  doxygen 1.4.2