isgraph, iswgraph, _isgraph_l, _iswgraph_l

判斷整數是否代表圖形字元。

語法

int isgraph(
   int c
);
int iswgraph(
   wint_t c
);
int _isgraph_l(
   int c,
   _locale_t locale
);
int _iswgraph_l(
   wint_t c,
   _locale_t locale
);

參數

c
待測試整數。

傳回值

如果 c 表示空白以外的特定可列印字元,則這些常式都會傳回非零。 如果 c 是空白以外的可列印字元,isgraph 會傳回非零值。 如果 c 是寬字元空白以外的可列印寬字元,iswgraph 會傳回非零值。 如果 c 不符合測試條件,則每個常式都會傳回 0。

這些具有 _l 尾碼的函式版本會使用傳入的地區設定參數來處理其地區設定相關行為,而不使用目前的地區設定。 如需詳細資訊,請參閱 Locale

和 的行為 isgraph_isgraph_l 未定義,如果 c 不是 EOF,或範圍 0 到0xFF,則包含。 使用偵錯 CRT 程式庫且 c 不是其中一個值時,函式會引發判斷提示。

泛型文字常式對應

TCHAR.H 常式 _UNICODE_MBCS 未定義 _MBCS 定義 _UNICODE 定義
_istgraph isgraph _ismbcgraph iswgraph
_istgraph_l _isgraph_l _ismbcgraph_l _iswgraph_l

備註

根據預設,此函式的全域狀態會限定于應用程式。 若要變更此行為,請參閱 CRT 中的全域狀態。

需求

常式 必要的標頭
isgraph <ctype.h>
iswgraph <ctype.h > 或 < wchar.h>
_isgraph_l <ctype.h>
_iswgraph_l <ctype.h > 或 < wchar.h>

如需相容性詳細資訊,請參閱相容性

另請參閱

字元分類
地區設定
isisw 常式