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



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

LeftStr

Return a number of characters starting at the left of a string.

Declaration

Source position: sysstrh.inc line 246

function LeftStr(

  const S: String;

  Count: Integer

):String;

Description

LeftStr returns the Count leftmost characters of S. It is equivalent to a call to Copy(S,1,Count).

Errors

None.

See also

RightStr

  

Return a number of characters from a string, starting at the end.

TrimLeft

  

Trim whitespace from the beginning of a string.

TrimRight

  

Trim whitespace from the end of a string.

Trim

  

Trim whitespace from the ends of a string.

Example

Program Example76;

{ This program demonstrates the LeftStr function }

Uses sysutils;

Begin
  Writeln (LeftStr('abcdefghijklmnopqrstuvwxyz',20));
  Writeln (LeftStr('abcdefghijklmnopqrstuvwxyz',15));
  Writeln (LeftStr('abcdefghijklmnopqrstuvwxyz',1));
  Writeln (LeftStr('abcdefghijklmnopqrstuvwxyz',200));
End.

Notes

 No notes exist for this page yet. 





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