RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.StrBufSize Function

Returns the maximum number of characters that can be stored in a buffer allocated by StrAlloc.

Pascal
function StrBufSize(const Str: PAnsiChar): Cardinal; overload;
function StrBufSize(const Str: PWideChar): Cardinal; overload;
C++
unsigned StrBufSize(const PAnsiChar Str);
unsigned StrBufSize(const PWideChar Str);

StrBufSize returns the number of bytes in Str, including the byte for the termination character.

Note: If Str does not point to a string buffer allocated by StrAlloc or StrNew, no error message is returned, and the result is unpredictable.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!