]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/hashcomp.h
add extra modules folder and exclude from build
[user/henk/code/inspircd.git] / include / hashcomp.h
index 0556f4399aefda9fb46042f0a0f24942fbfd3755..033003f71acc14620d96a9d3124a7129159d9ccd 100644 (file)
@@ -324,9 +324,10 @@ namespace irc
                virtual ~sepstream();
 
                /** Fetch the next token from the stream
-                * @return The next token is returned, or an empty string if none remain
+                * @param token The next token from the stream is placed here
+                * @return True if tokens still remain, false if there are none left
                 */
-               virtual const std::string GetToken();
+               virtual bool GetToken(std::string &token);
                
                /** Fetch the entire remaining stream, without tokenizing
                 * @return The remaining part of the stream
@@ -613,6 +614,20 @@ inline bool operator== (const irc::string& leftval, const std::string& rightval)
        return (leftval == rightval.c_str());
 }
 
+/* Define operators != for irc::string to std::string for easy comparison
+ */
+inline bool operator!= (const irc::string& leftval, const std::string& rightval)
+{
+       return !(leftval == rightval.c_str());
+}
+
+/* Define operators != for std::string to irc::string for easy comparison
+ */
+inline bool operator!= (const std::string& leftval, const irc::string& rightval)
+{
+       return !(leftval.c_str() == rightval);
+}
+
 /** Assign an irc::string to a std::string.
  */
 inline std::string assign(const irc::string &other) { return other.c_str(); }