/* *@parameter key is the value it need to convert *@parameter len is the length of key,but not the size of the array *@parameter len_table is the size of table * * */ int replicate(char key[], unsigned int len, unsigned int len_table);
将字符串哈希成数字的几种经典的方法:其中的一部分 #ifndef INCLUDE_GENERALHASHFUNCTION_C_H #define INCLUDE_GENERALHASHFUNCTION_C_H #include typedef unsigned int (*hash_function)(char*, unsigned int len); unsigned int RSHash (char* str, unsigned int len); unsigned int JSHash