Board index » delphi » Read spécific caracters ???

Read spécific caracters ???

How can I read on a string a specific caracter like the first one  or last
one or a group "contigue" of caraters if it is possible ???

Tank you verry mutch

Jean Marc Ferron

 

Re:Read spécific caracters ???


Quote
Jean Marc Ferron wrote:

> How can I read on a string a specific caracter like the first one  or last
> one or a group "contigue" of caraters if it is possible ???

> Tank you verry mutch

> Jean Marc Ferron

var
st,subst:string;
ch:Char;

begin
  st:='Hello world!';
  ch:=st[1];             // ch=H
  ch:=st[Length(st)];    // ch=!
  subst:=Copy(st,1,5);   // subst=Hello
end.

Alex
--
** Pepsi Cola and animal protection **
**  http://www.pepsi{*word*76}bath.com/  **

Author of the free Chatsystem PINO! || Website: http://www.alcomp.net
Available at http://pino.cjb.net    || Chat   : pinochat.dhs.org:8080

Re:Read spécific caracters ???


Merci beaucoup Alexander

Jean marc Ferron
_______________________________

Alexander Mueller <al...@gmx.at> a crit dans le message :
387690EE.D0EC3...@gmx.at...

Quote
> Jean Marc Ferron wrote:

> > How can I read on a string a specific caracter like the first one  or
last
> > one or a group "contigue" of caraters if it is possible ???

> > Tank you verry mutch

> > Jean Marc Ferron

> var
> st,subst:string;
> ch:Char;

> begin
>   st:='Hello world!';
>   ch:=st[1];             // ch=H
>   ch:=st[Length(st)];    // ch=!
>   subst:=Copy(st,1,5);   // subst=Hello
> end.

> Alex
> --
> ** Pepsi Cola and animal protection **
> **  http://www.pepsi{*word*76}bath.com/  **

> Author of the free Chatsystem PINO! || Website: http://www.alcomp.net
> Available at http://pino.cjb.net    || Chat   : pinochat.dhs.org:8080

Other Threads