Como usar de forma simples a funcao left (clipper) em Delphi

Delphi

06/01/2004

Colegas,,,
Como usar de forma simples a funcao left (clipper) em Delphi

ex:

Texto=´A casa é bonita´

Parte=left(Texto,6) (resultando: A casa)

aproveito para saber qual a funcao equivalente a

right()
substr()
Emerson.


Emerson_

Emerson_

Curtidas 0

Respostas

Aroldo Zanela

Aroldo Zanela

06/01/2004

Colega,

Use:

StrDireita := RightStr(´STRING´, 3); // Retorna ING = Rigth

StrEsquerda := Copy(´STRING´, 1, 3); // STR = Left

StrMeio := Copy(´STRING´, 3, 2); // RI = Substr



GOSTEI 0
Alexdias

Alexdias

06/01/2004

OLÁ COLEGA ...

TENTEI SER O MAS SIMPLES POSSIVEL ...

label1.caption:=´MARTELO´;
label2.caption:=copy(label1.caption,1,7); // a partir da 1º posição copie 7 posições.
label3.caption:=copy(label1.caption,3,2); // a partir da 3º posição copie 2 posições.

// label2.caption=´MARTELO´;
//label3.caption=´RT´;


SE ESTE EXEMPLO TE SERVIU COMO AJUDA MANDE-ME UM E-MAIL ...


GOSTEI 0
POSTAR