virtual P6R::P6ERR P6R::p6ISafeString::strlcpy ( P6R::P6CHAR *  pszDest,
P6R::P6SIZE  cDest,
const P6R::P6CHAR *  pszSource,
P6R::P6SIZE *  pcCopied 
) [pure virtual]

Copies pszSource to pszDest and always NULL terminates the output.

Note:
This method is safer than the original BSD strlcpy() implementation. The original strlcpy() implementation does not always null terminate the output and provides no real indication of error. For example strlcpy(buffer,"astring",2) would silently fail and NOT null terminate the output. Our implementation returns eTooBig and NULL terminates the output even on error.
Parameters:
pszDest [out] A pointer to the destination buffer.
cDest [in] The maximum number of charaters to copy.
pszSource [in] A pointer to the NULL terminated string to copy.
pcCopied [out, optional] The address of a variable in which, on success, will be placed the number of characters copied to pszDest (not including the NULL terminator). On failure this will be set to zero. If this information is not required, NULL can be passed.
Returns:
SuccessP6R::eOk 
FailureP6R::eInvalidArgpszDest or pszSource is NULL or cDest is zero
P6R::eTooBigpszSource is longer than cDest characters. The output was truncated.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.