programming.nbk: Home | Index | Next Page: Sockets | Previous Page: size_t


 size_t strftime(char* ptr, size_t maxsize, const char* format, const struct tm* timeptr);

Format time to string

Copies into ptr the content of format, expanding its format tags into the corresponding values as specified by timeptr, with a limit of maxsize characters.

Parameters

Return Value

If the resulting C string fits in less than maxsize characters including the terminating null-character, the total number of characters copied to ptr (not including the terminating null-character) is returned. Otherwise, zero is returned and the contents of the array are indeterminate.

Portability

This description corresponds to the C++ version of this function (which is the same as in the ISO-C Standard of 1990). C compilers may support additional specifiers and modifiers for the format parameter of this function, which are not described here.


programming.nbk: Home | Index | Next Page: Sockets | Previous Page: size_t


Notebook exported on Monday, 7 July 2008, 18:56:06 PM Eastern Daylight Time