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



[Overview][Procedures and functions] Reference for unit 'strings' (#rtl)

strpas

Convert a null-terminated string to a shortstring.

Declaration

Source position: strings.pp line 20

function strpas(

  p: pchar

):shortstring;

Description

Converts a null terminated string in P to a Pascal string, and returns this string. The string is truncated at 255 characters.

Errors

None.

See also

StrPCopy

  

Copy a pascal string to a null-terminated string

Example

Program Example3;

Uses strings;

{ Program to demonstrate the StrPas function. }

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

var S : string;

begin
  S:=StrPas (P);
  Writeln ('S : ',S);
end.

Notes

 No notes exist for this page yet. 





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