delphi 字符或符号在字符串出现的次数


本文整理自网络,侵删。

 
function SymbolEntersCount(s: string; ch: char): integer;
var
i: integer;
begin
Result := 0;
if Trim(s) <> '' then
   for i := 1 to Length(s) do
     if s[i] = ch then
       inc(Result);
end;

相关阅读 >>

Delphi 制作一个内网传播的程序

Delphi版多开源码,也就是遍历系统内核对象句柄

Delphi 打开"我的电脑"等特殊文件夹

Delphi tstringlist删除重复项

Delphi的datetostr strtodate格式灵活用法

Delphi从excel读取数据存入数据库demo

Delphi firemonkey应用程序中显示时隐藏虚拟键盘

Delphi 读取dll所有输出函数名

Delphi 判断字符串是否是单词

Delphi 判断目录是否可写

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...