00 Votes

Delphi: Trim only left or right?

Question by Guest | 2013-01-14 at 23:47

Trim is a very useful feature for me. However, I need a function letting me cut the white space or the blanks only on the left or the right side of the string. Is there such a function in Delphi or do I have to write an own function?

ReplyPositiveNegative
1Best Answer1 Vote

Besides the function Trim(), Delphi and Lazarus are also providing the functions TrimLeft() and TrimRight(). I think this functions are exactly the functions you are searching for. You can use them in the same way, you are using Trim().

Here is an example for Trim, TrimLeft and TrimRight.
2013-01-15 at 15:38

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.