Topic: TrimRight

Hello MVD

How to trim right in text or memo fields.  Please help!

Thanks, manixs

Re: TrimRight

Trim() function should take care of it.

Re: TrimRight

Sample Please!

Re: TrimRight

Hello manixs

An example with the three kinds of Trim :


const
  String = '  MyString     ';
begin
  ShowMessage('[' + TrimLeft(String)  + ']');   // delete space on the left of your string
  ShowMessage('[' + TrimRight(String) + ']'); // delete space on the right of youyr string
  ShowMessage('[' + Trim(String)      + ']');    // delete spaces on the left and right of your string
end;

Result will be :

[MyString     ]
   [  MyString]
   [MyString]

can this help you ?

JB

Re: TrimRight

yes. Thanks Jean!