strerrorlen_s
string.h:インデックス への移動
ヘッダー ファイル
string.h、stdio.h
カテゴリ
メモリおよび文字列操作ルーチン
プロトタイプ
size_t strerrorlen_s(errno_t errnum);
説明
エラー メッセージのサイズを判定します。
strerrorlen_s では、errnum に対応する切り詰められたロケール固有のエラー メッセージの長さを取得できます。
戻り値
strerror_s はエラー メッセージの文字数を返します。
例
#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; }
移植性
POSIX | Win32 | ANSI C | ANSI C++ |
---|---|---|---|
+ |