| Light C | ← → 目次 索引 |
C 言語では標準で多くのライブラリ関数が提供されています。ライブラリ関数を使用するときは、所属するヘッダー ファイルをインクルードすることをお勧めします (そうしないと使用できない関数もあります)。
| 関数 | 所属 | 説明 |
|---|---|---|
| strcpy # , strncpy | string.h | コピー |
| memcpy # , memmove # | string.h | コピー |
| memset # | string.h | 充填 |
| strcat # , strncat | string.h | 連結 |
| strlen # | string.h | 長さの計測 |
| strcmp # , strncmp, memcmp # | string.h | 比較 |
| _stricmp # * , _memicmp # * | string.h | 比較 (大文字と小文字を区別しない) |
| _strhcmp, _strtcmp | string.h | 先頭および末尾の比較 |
| strchr # , strrchr, memchr # | string.h | 文字の検索 |
| strstr, _memstr | string.h | 文字列の検索 |
| strspn, strcspn, strpbrk | string.h | 文字群の検索 |
| strtok | string.h | トークンの切り出し |
| _memrep | string.h | 文字列の置換 |
| _memshl | string.h | ビット シフト |
| _memand, _memor, _memxor, _memnot | string.h | ビット演算 (AND, OR, XOR) |
| 関数 | 所属 | 説明 |
|---|---|---|
| sprintf, vsprintf | stdio.h | 書式化 |
| _itoa * | stdlib.h | int → 文字列 |
| _utoa * | stdlib.h | unsigned int → 文字列 |
| _ltoa * | stdlib.h | long → 文字列 |
| _ultoa * | stdlib.h | unsigned long → 文字列 |
| 関数 | 所属 | 説明 |
|---|---|---|
| sscanf, vsscanf | stdio.h | 指定の書式に従って解析 |
| atoi | stdlib.h | 文字列 → int |
| strtol, atol | stdlib.h | 文字列 → long |
| strtoul | stdlib.h | 文字列 → unsigned long |
| strtod, atof | stdlib.h | 文字列 → double |
| 関数 | 所属 | 説明 |
|---|---|---|
| isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit | ctype.h | 文字の分類 |
| isleadbyte, _iskanji * , _iskanji2 * , _iskana * , _iskmoji * | ctype.h | 文字の分類 |
| _iskanji2nd | ctype.h | 全角第 2 バイトかどうかの判定 |
| tolower, toupper | ctype.h | 大文字化、小文字化 |
| _jis2sjis, _sjis2jis | ctype.h | JIS コードと Shift-JIS コードの相互変換 |
| 関数 | 所属 | 説明 |
|---|---|---|
| mblen | string.h | 多バイト文字の文字サイズの取得 |
| mbtowc | stdlib.h | 多バイト文字 → ワイド文字 |
| wctomb | stdlib.h | ワイド文字 → 多バイト文字 |
| mbstowcs | stdlib.h | 多バイト文字列 → ワイド文字列 |
| wcstombs | stdlib.h | ワイド文字列 → 多バイト文字列 |
| wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp | string.h | ワイド文字列の各種操作 |
| 関数 | 所属 | 説明 |
|---|---|---|
| fabs | math.h | 絶対値 |
| fmod | math.h | 剰余 |
| sqrt | math.h | 平方根 |
| exp | math.h | 指数関数 ex |
| pow | math.h | 累乗 yx |
| log | math.h | 自然対数 logex |
| log10 | math.h | 常用対数 log10x |
| sin, cos, tan | math.h | 三角関数 |
| asin, acos, atan, atan2 | math.h | 逆三角関数 |
| sinh, cosh, tanh | math.h | 双曲線関数 |
| floor | math.h | 小数点以下の切り捨て |
| ceil | math.h | 小数点以下の切り上げ |
| modf | math.h | 整数部分と小数部分の取得 |
| frexp | math.h | x × 2y に分解 |
| ldexp | math.h | x × 2y から合成 |
| _getfcw, _setfcw | math.h | FPU の丸めモードの取得と設定 |
| 関数 | 所属 | 説明 |
|---|---|---|
| clock | time.h | プログラムの起動からの経過時間の取得 |
| time | time.h | 現在の日時を time_t 型で取得 |
| gmtime | time.h | time_t から tm への変換 (GMT) |
| localtime | time.h | time_t から tm への変換 |
| mktime | time.h | tm から time_t への変換 |
| ctime | time.h | time_t から文字列への変換 |
| asctime | time.h | tm から文字列への変換 |
| strftime | time.h | 文字列から tm への変換 |
| difftime | time.h | 2 つの日時の差の取得 |
| 関数 | 所属 | 説明 |
|---|---|---|
| signal | signal.h | ハンドラ関数の登録 |
| raise | signal.h | ハンドラ関数の呼び出し |
| 関数 | 所属 | 説明 |
|---|---|---|
| setjmp | setjmp.h | ジャンプ先の記憶 |
| longjmp | setjmp.h | ジャンプ実行 |
| 関数 | 所属 | 説明 |
|---|---|---|
| peekw, peekb | dos.h | メモリ直接読み出し |
| pokew, pokeb | dos.h | メモリ直接書き込み |
| inportw, inportb | dos.h | I/O ポートから入力 |
| outportw, outportb | dos.h | I/O ポートへ出力 |
| FP_SEG, FP_OFF, MK_FP | dos.h | ポインタとセグメント/オフセットの相互変換 |
| get_regs, get_sregs | dos.h | レジスタ値の取得 |
| set_regs | dos.h | レジスタ値の設定 |
| int86, int86x | dos.h | 割り込みの実行 |
| intdos, intdosx | dos.h | MS-DOS ファンクション コールの実行 |
| getvect | dos.h | 割り込みベクタの取得 |
| setvect | dos.h | 割り込みベクタの設定 |
| 関数 | 所属 | 説明 |
|---|---|---|
| abs, labs | stdlib.h | 絶対値の取得 |
| div, ldiv | stdlib.h | 商と剰余の取得 |
| qsort | stdlib.h | クイック ソート |
| bsearch | stdlib.h | 二分検索 |
| rand, srand | stdlib.h | 乱数 |
| _max * , _min * | stdlib.h | 大きい方、小さい方の選択 (マクロ関数) |
| offsetof | stddef.h | 構造体メンバのオフセットの取得 (マクロ関数) |
| strerror | string.h | エラー メッセージの取得 |
| assert | assert.h | デバッグ目的のチェック |
| va_start, va_arg, va_end | stdarg.h | 可変個引数の取得 |
| _rest_stack, _min_stack | stdlib.h | 残存スタック サイズの取得 |
| _asmcode | stdlib.h | 機械語コードの直接実行 |
| 関数 | 所属 | 説明 |
|---|---|---|
| fopen | stdio.h | ファイルのオープン |
| freopen | stdio.h | ファイルの再オープン |
| fclose | stdio.h | ファイルのクローズ |
| fflush | stdio.h | ファイル バッファのフラッシュ |
| fseek, fsetpos, rewind | stdio.h | ファイル ポインタの移動 |
| ftell, fgetpos | stdio.h | ファイル ポインタの位置の取得 |
| feof | stdio.h | ファイル終端の検査 |
| ferror | stdio.h | エラー発生の確認 |
| clearerr | stdio.h | ファイル終端フラグとエラー フラグのリセット |
| setvbuf, setbuf | stdio.h | ファイル バッファの設定 |
| remove | stdio.h | ファイルの削除 |
| rename | stdio.h | ファイル名の変更 |
| tmpnam | stdio.h | 一時ファイル名の取得 |
| tmpfile | stdio.h | 一時ファイルのオープン |
| 関数 | 所属 | 説明 |
|---|---|---|
| printf, vprintf | stdio.h | 書式化して出力 |
| puts | stdio.h | 文字列を出力 |
| putchar | stdio.h | 1 バイトを出力 |
| fprintf, vfprintf | stdio.h | 書式化してファイルに出力 |
| fwrite # | stdio.h | 指定長のデータをファイルに出力 |
| fputs # | stdio.h | 文字列をファイルに出力 |
| _putw | stdio.h | 2 バイトをファイルに出力 |
| fputc, putc | stdio.h | 1 バイトをファイルに出力 |
| 関数 | 所属 | 説明 |
|---|---|---|
| scanf, vscanf | stdio.h | 指定の書式に従って入力 |
| gets | stdio.h | 文字列を入力 |
| getchar | stdio.h | 1 バイトを入力 |
| fscanf, vfscanf | stdio.h | 指定の書式に従ってファイルから入力 |
| fread | stdio.h | 指定長のデータをファイルから入力 |
| fgets | stdio.h | 文字列をファイルから入力 |
| _getw | stdio.h | 2 バイトをファイルから入力 |
| fgetc, getc | stdio.h | 1 バイトをファイルから入力 |
| ungetc | stdio.h | 文字入力の取り消し |
| 関数 | 所属 | 説明 |
|---|---|---|
| _creat, _open, _close, _read, _lseek | stdio.h | 直接 OS を呼び出す入出力関数 |
| 関数 | 所属 | 説明 |
|---|---|---|
| malloc, _nmalloc, _fmalloc | malloc.h | メモリの取得 |
| free, _nfree, _ffree | malloc.h | メモリの解放 |
| realloc, calloc | malloc.h | メモリの取得 |
| _msize | malloc.h | メモリ ブロック サイズの取得 |
| _nmrest, _fmrest | malloc.h | 残存メモリ サイズの取得 |
| 関数 | 所属 | 説明 |
|---|---|---|
| main | 最初に呼び出される関数 | |
| exit, _exit | stdlib.h | 終了 |
| atexit | stdlib.h | 終了時に呼び出される関数の登録 |
| abort | stdlib.h | 異常終了 |
| getenv | stdlib.h | 環境変数の値の取得 |
| system, _system | stdlib.h | 他のプログラムの実行 |
| _getpsp | stdlib.h | MS-DOS の PSP の取得 |
| perror | stdio.h | エラー メッセージの表示 |
| Copyright © Tama Software Ltd, 1999-2012. | ← → 目次 索引 |