Substr.Trim Method

function Trim(const Src: Substring): Substring; overload;

Src without the characters <= ' ' at both ends.

#NameTypeDescription
1SrcSubstring

Returns: Substring - The part, as Mid returns it.

Examples

Spaces removed.

uses Substr;

procedure Example;
begin
    Assert(Trim(Substring('  a  ')) = 'a');
end;