From Clomosy Docs

Revision as of 13:48, 28 February 2023 by ClomosyManager (talk | contribs) (Created page with " function Trim(const Text String):String; The Trim function removes blank and control characters (such as line feed) from the start and end of a string.<br> Use '''TrimLeft''' or '''TrimRight''' to limit the operation to just one end of the string.<br> '''Example:'''<br> '''const''' textValue = ' Text ';<br> '''begin'''<br> ShowMessage('/'+TrimLeft(textValue)+'/'); ShowMessage('/'+TrimRight(textValue)+'/'); ShowMessage('/'+Trim(textValue)+'/');<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

function Trim(const Text String):String;

The Trim function removes blank and control characters (such as line feed) from the start and end of a string.

Use TrimLeft or TrimRight to limit the operation to just one end of the string.

Example:

const
  textValue = '      Text     ';
begin
ShowMessage('/'+TrimLeft(textValue)+'/'); ShowMessage('/'+TrimRight(textValue)+'/'); ShowMessage('/'+Trim(textValue)+'/');
end;

Output: