strerrorlen_s
Go Up to string.h Index
Header File
string.h, stdio.h
Category
Memory and String Manipulation Routines
Prototype
size_t strerrorlen_s(errno_t errnum);
Description
Determines the size of an error message.
strerrorlen_s lets you get the length of the truncated locale-specific error message that corresponds to errnum.
Return Value
strerror_s returns the number of characters in the error message.
Example
#include <stdio.h>
#include <errno.h>
#include <string.h>
int main(void)
{
unsigned int s1max = 100;
char message[100];
strerror_s(message, s1max, 3);
printf_s("Error: %s\n", message);
printf_s("Error number %d has %d characters.", 3, strerrorlen_s(3));
return 0;
}
Portability
| POSIX | Win32 | ANSI C | ANSI C++ |
|---|---|---|---|
|
+ |