1 /* $XConsortium: Hash.C /main/1 1996/07/29 16:52:41 cde-hp $ */
2 // Copyright (c) 1994 James Clark
3 // See the file COPYING for copying permission.
13 namespace SP_NAMESPACE {
16 unsigned long Hash::hash(const StringC &str)
18 const Char *p = str.data();
20 for (size_t n = str.size(); n > 0; n--)
21 h = (h << 5) + h + *p++; // from Chris Torek