·上一篇:Delphi 將金額轉換為大寫函數
·下一篇:ASP GB2312編碼轉換UTF-8函數
Delphi 獲得字符串中漢字的總個數
Delphi 獲得字符串中漢字的總個數
- Delphi code復制代碼
function HowManyChineseChar(Const s:String):Integer; var SW:WideString; C:String; i, WCount:Integer; begin SW:=s; WCount:=0; For i:=1 to Length(SW) do begin c:=SW[i]; if Length(c)>1 then Inc(WCount); end; Result:=WCount; end;
評論內容只代表網友觀點,與本站立場無關!
評論摘要(共 0 條,得分 0 分,平均 0 分)
查看完整評論