Documentation
Back to website >

TrimLeft (Pascalscript)

Description

TrimLeft removes all blanks and control characters at the beginning of a string.

Syntax

function TrimLeft(const S: string): string;

Arguments

TrimLeft removes all blanks and control characters at the beginning of the string specified with S.

Excample

var
  S1: String;
  S2 : String;
begin
  S1:='   Hallo hier bin ich   ';
  S2:=TrimLeft(S1);
  ShowMessage(S2);
end;

Rules to understand the script can be found here.

The text '    Hallo hier bin ich    ' is assigned to variable S1. The TrimLeft function removes all leading non-printable characters from S1 and assigns the result to variable S2.

ShowMessage shows: 'Hallo hier bin ich    '