Changeset 247 for cpp/frams/util/sstring.h
- Timestamp:
- 11/07/14 17:51:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring.h
r198 r247 22 22 // - mutex required to be thread safe 23 23 24 #include <stdint.h> 24 25 #include <string.h> 25 26 #include <stdlib.h> … … 47 48 SBuf(); 48 49 ~SBuf(); 49 u nsigned longhash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash50 uint32_t hash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash 50 51 }; 51 52 … … 155 156 void operator+=(const SString&); ///< append other SString 156 157 157 intequals(const SString &s) const; ///< TRUE if equal158 intoperator==(const SString &s) const {return equals(s);} ///< TRUE if equal159 intoperator!=(const SString &s) const {return !equals(s);}158 bool equals(const SString &s) const; ///< TRUE if equal 159 bool operator==(const SString &s) const {return equals(s);} ///< TRUE if equal 160 bool operator!=(const SString &s) const {return !equals(s);} 160 161 const char* operator()(int p) const {return buf->txt+p;} ///< pointer to p'th character in SString 161 162 char operator[](int i) const {return buf->txt[i];} ///< get char like in array … … 175 176 int startsWith(const char *pattern) const; 176 177 char charAt(int pos) const {return buf->txt[pos];} 177 u nsigned longhash() const {return buf->hash();}178 uint32_t hash() const {return buf->hash();} 178 179 179 180 static SString valueOf(int);
Note: See TracChangeset
for help on using the changeset viewer.