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之猥琐的webserver实现

Delphi 之 tmemo组件使用

Delphi winapi: getnextwindow - 获取指定窗口z上或z下的窗口的句柄

Delphi crc算法的实现

Delphi tms web core 在线pdf教程

Delphi xe 10 跨平台三层数据库应用教程

Delphi exe图标替换

Delphi 虚拟桌面服务程序

Delphi memo 自动滚动到最底下

Delphi回调函数高级应用

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



打赏

取消

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

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

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

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

评论

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