function getGTK(str){
var hash = 5381; for(var i = 0, len = str.length; i < len; ++i){
hash += (hash << 5) + str.charAt(i).charCodeAt();
} return hash & 0x7fffffff;
}这个怎么转为DELPHI的函数?
var hash = 5381; for(var i = 0, len = str.length; i < len; ++i){
hash += (hash << 5) + str.charAt(i).charCodeAt();
} return hash & 0x7fffffff;
}这个怎么转为DELPHI的函数?
解决方案 »
- 请教,类似一个QQ登录框的下拉框删除QQ号码的功能,使用COMBOBOX
- 如何实现控制另一个程序运行的功能?
- 用友政务Delphi软件工程师(人数:5)[email protected] 010-82613388-5002 别删好不好
- 各位大哥,谁有烟草生产企业的结构图?
- 斑竹,我的可用分怎么不增加了!
- 国耻签名活动,请版主置顶!!!!!!!-----我的心真的很痛
- :::::菜题::如何查询快(视图,存储过程,执行SQL语句):::::
- Mscomm串口控件使用Input方法报错,用其他方法就行,如Inbuffercount
- 请问,如何判定光标停在edit中的第几个位置?
- 请问如何让Delphi写的DLL可以被VC程序动态连接?
- 关于地址对应城市或区/县的设计
- delphi 判断网络问题
var
hash:Integer;
len,i:Integer;
begin
hash := 5381;
result := 0;
len := Length(str);
for i := 1 to len do
begin
result :=result+(hash shl 5) + Ord(str[i]);
end;
end;