help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

TrimLeft

Trim whitespace from the beginning of a string.

Declaration

Source position: line 0

function TrimLeft(

  const S: String

):String;

function TrimLeft(

  const S: widestring

):widestring;

Description

TrimLeft strips blank characters (spaces) at the beginning of S and returns the resulting string. Only #32 characters are stripped. If the string contains only spaces, an empty string is returned.

Errors

None.

See also

Trim

  

Trim whitespace from the ends of a string.

TrimRight

  

Trim whitespace from the end of a string.

Example

Program Example85;

{ This program demonstrates the TrimLeft function }

Uses sysutils;
{$H+}

Procedure Testit (S : String);

begin
  Writeln ('"',TrimLeft(S),'"');
end;

Begin
  Testit ('  ha ha what gets lost ? ');
  Testit (#10#13'haha ');
  Testit ('              ');
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505