logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pmsprintf - formatted string conversion

C Synopsis

#include<pcp/pmapi.h>intpmsprintf(char*str,size_tsize,constchar*fmt,.../*args*/);cc...-lpcp

Description

       Safe string formatting interface that wraps the vsnprintf(3) call.

       It differs primarily in that pmsprintf guarantees that the output buffer str will be null-terminated even
       when  the  provided  buffer  size  is insufficient to contain the formatted string.  In this case a null-
       terminated truncated string will be returned in str.

       In the case of a failure in the underlying vsnprintf interface, a null-terminated empty  string  will  be
       returned in str, and the return value will be zero.

Diagnostics

       On  successful completion, pmsprintf returns the number of characters written to the supplied buffer, not
       including the null terminator.

       The return code is always zero or more, never negative.

Name

pmsprintf - formatted string conversion

See Also

vsnprintf(3), pmprintf(3) and PMAPI(3).

Performance Co-Pilot                                   PCP                                          PMSPRINTF(3)

See Also