Ignore:
Timestamp:
03/25/14 18:49:56 (10 years ago)
Author:
Maciej Komosinski
Message:

Hashing function for strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/sstring.h

    r197 r198  
    4747SBuf();
    4848~SBuf();
     49unsigned long hash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash
    4950};
    5051
     
    174175int startsWith(const char *pattern) const;
    175176char charAt(int pos) const {return buf->txt[pos];}
     177unsigned long hash() const {return buf->hash();}
    176178
    177179static SString valueOf(int);
Note: See TracChangeset for help on using the changeset viewer.