Ver Mensaje Individual
  #8  
Antiguo 10-10-2012
Gatsoft Gatsoft is offline
Registrado
 
Registrado: oct 2006
Posts: 8
Reputación: 0
Gatsoft Va por buen camino
Talking

LB_NOMBRES.Caption:=SearchAndReplace(LB_NOMBRES.Caption,'É','E')


Código Delphi [-]
FUNCTION SearchAndReplace(sSrc, sLookFor, sReplaceWith : string) : string;
VAR
   nPos, nLenLookFor : integer;
BEGIN
   nPos := Pos(sLookFor, sSrc) ;
   nLenLookFor := Length(sLookFor) ;
   while (nPos > 0) do begin
     Delete(sSrc, nPos, nLenLookFor) ;
     Insert(sReplaceWith, sSrc, nPos) ;
     nPos := Pos(sLookFor, sSrc) ;
   end;
   Result := sSrc;
END;

Última edición por Casimiro Notevi fecha: 10-10-2012 a las 21:28:53. Razón: Poner etiquetas [delphi] [/delphi]
Responder Con Cita