Board index » delphi » how to take only the first 10 chars of a 15 char string ?

how to take only the first 10 chars of a 15 char string ?

dear sir and madams,

how to take only the first 10 chars of a 15 char string ?

say I have a 15 char string and I only want the first 10 chars to be used
for a filter.

how do i do take the first 10 characters ?

thanks

 

Re:how to take only the first 10 chars of a 15 char string ?


Quote
>dear sir and madams,

>how to take only the first 10 chars of a 15 char string ?

>say I have a 15 char string and I only want the first 10 chars to be used
>for a filter.

>how do i do take the first 10 characters ?

>thanks

NewString := Copy(OldString,1,10);

If you had bothered pressing F1, and entering STRING, you would have found
it.  It would have taken you less time than it took me loading and reading
your message.

I am only replying to this because I am amazed at how , pardon the
expression, lazy some people are in terms of looking in the help files.  And
since no one from TeamB is making an effort in saving me time and remove
these questions, I have taken it upon myself. (No blame is cast, just a
statement of facts)

Other Threads