Sign in Join
FPDoc Onlineexperiment

strend function

In unit Strings

Return a pointer to the end of a null-terminated string.

Declaration

pascal
function strend(p: PAnsiChar): PAnsiChar

Description

Returns a pointer to the end of P. (i.e. to the terminating null-character.

Errors

None.

See also

Example: ex7

pascal
Program Example6;

Uses strings;

{ Program to demonstrate the StrEnd function. }

Const P : PChar = 'This is a PCHAR string.';

begin
  If Longint(StrEnd(P))-Longint(P)<>StrLen(P) then
    Writeln('Something is wrong here !')
  else
    Writeln ('All is well..');
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.