从前向后查找字符c在字符串s中的位置,输出字符c的位置,
来源:百度知道 编辑:UC知道 时间:2024/06/15 18:56:44
从后向前查找字符c在字符串s中的位置,输出字符c的位置。
Delphi COde;
function SearchStr(Const S,Code:String):Integer;cdcel;
Var
Count:Integer;
Str:String;
Begin
Result:='';
For i:=1 to Length(s) do
Begin
If (s[count]=code) Then
Begin
Result:=Count;
break;
end;
end;
end;
end;
strrchr