Caracteres

Delphi

27/01/2004

Olá!!!
Como faço para detectar o número de ´tal´ letra num determinado texto? Tipo, como adquiro o número de letras A que apareceram no texto Sem Título.txt

T+ :wink:


Celo-faveri

Celo-faveri

Curtidas 0

Respostas

Speedrob

Speedrob

27/01/2004

tenta isso

N:=0;
IF EDIT1.TEXT=´´ THEN
SHOWMESSAGE(´DIGITE UM CARACTER´)
ELSE
BEGIN
FOR I:=1 TO Length(MEMO1.Text) DO
IF COPY(MEMO1.TEXT,I,1)=EDIT1.TEXT THEN
N:=N+1;
label4.caption:=edit1.text;
LABEL5.Caption:=INTTOSTR(N);
END;


GOSTEI 0
POSTAR