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

strlen

Length of a null-terminated string.

Declaration

Source position: syspchh.inc line 24

function strlen(

  p: PChar

):SizeInt;

Description

Returns the length of the null-terminated string P.

Errors

None.

See also

StrNew

  

Allocate room for new null-terminated string.

Example

Program Example1;

Uses strings;

{ Program to demonstrate the StrLen function. }

Const P : PChar = 'This is a constant pchar string';

begin
  Writeln ('P         : ',p);
  Writeln ('length(P) : ',StrLen(P));
end.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.