JCL Help:StrRefCount@AnsiString
JCL Help: StrRefCount Function
Search in JCL Help
Search in all projects
Summary
Returns the reference count of the supplied string.
Pascal
function StrRefCount(const S: string): SizeInt;
function StrRefCount(const S: AnsiString): Longint;
Parameters
Parameters | Description |
const S: string | String for which to determine the reference count. |
Return Value
The reference count of the string or -1 if the string ultimately points to a string constant.
Description
StrRefCount returns the reference count of the string. Note that this function will always return -1 for string literals, string constants and string variables that are assigned to string constants, but haven't been modified yet. This is not a bug but a result of the way in which Delphi manages string constants.
See Also
About
Unit
Donator
Marcel van Brakel
Notes
This function relies on pseudo-undocumented knowledge and should only be used for debugging purposes.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page