Substr.TrimRight Method

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

Src without the characters <= ' ' at its end.

#NameTypeDescription
1SrcSubstring

Returns: Substring

Examples

Trailing spaces removed.

uses Substr;

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