Ver Mensaje Individual
  #2  
Antiguo 26-12-2003
Mick Mick is offline
Miembro
 
Registrado: may 2003
Posts: 405
Reputación: 22
Mick Va por buen camino
Código:
function CountChars(Str:string; car:Char):integer;
var
 Ptr:PChar;
begin
  Result:= 0;
  Ptr:= PChar(Str);
  while Ptr^<>#0 do begin
    if Ptr^=car then Inc(Result);
    Inc(Ptr);
  end;
end;
Salud2 !!!
Responder Con Cita