Ver Mensaje Individual
  #2  
Antiguo 14-12-2004
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.329
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Bueno, no debería ser muy difícil crearla....

Código Delphi [-]
  function Repeticiones(const cadena:String; const ch:Char):Integer;
  var
    i, Count:Integer;
  begin
    // caracteres de la cadena
    Count := Length(cadena);
    // Inicializar
    Result := 0;
    // Para cada caracter de la cadena
    for i := 1 to (Count) do begin
      // es el que buscamos....
      if(cadena[i]=ch) then begin
        Result := Result + 1;
      end; // if
    end; // for
  end;


...o parecida...
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita