標準庫標頭檔案 <cstring>
來自 cppreference.com
此標頭檔案最初是 C 標準庫中的 <string.h>。
此標頭檔案用於C 風格的空終止位元組字串。
宏 | ||
實現定義的空指標常量 (宏常量) | ||
型別 | ||
由 sizeof 運算子返回的無符號整型 (typedef) | ||
函式 | ||
字串操作 | ||
將一個字串複製到另一個字串 (函式) | ||
從一個字串複製一定數量的字元到另一個字串 (函式) | ||
連線兩個字串 (函式) | ||
連線兩個字串的特定數量的字元 (函式) | ||
轉換字串,使 strcmp 產生與 strcoll 相同的結果(函式) | ||
字串檢查 | ||
返回給定字串的長度 (函式) | ||
比較兩個字串 (函式) | ||
比較兩個字串的特定數量的字元 (函式) | ||
根據當前區域設定比較兩個字串 (函式) | ||
查詢字元的第一次出現 (函式) | ||
查詢字元的最後一次出現 (函式) | ||
返回由另一個位元組字串中找到的字元組成的最大初始段的長度 的字元 (函式) | ||
返回由另一個位元組字串中找到的字元組成的最大初始段的長度 僅由另一個位元組字串中未找到的字元組成 (函式) | ||
查詢分隔符集中任何字元的第一個位置 (函式) | ||
查詢字元子字串的第一次出現 (函式) | ||
查詢位元組字串中的下一個標記 (函式) | ||
字元陣列操作 | ||
在陣列中搜索字元的第一次出現 (函式) | ||
比較兩個緩衝區 (函式) | ||
用字元填充緩衝區 (函式) | ||
將一個緩衝區複製到另一個緩衝區 (函式) | ||
將一個緩衝區移動到另一個緩衝區 (函式) | ||
雜項 | ||
返回給定錯誤程式碼的文字版本 (函式) |
[編輯] 注意
- NULL 也定義在以下標頭檔案中
- std::size_t 也定義在以下標頭檔案中
[編輯] 概要
namespace std { using size_t = /* see description */; // freestanding void* memcpy(void* s1, const void* s2, size_t n); // freestanding void* memmove(void* s1, const void* s2, size_t n); // freestanding char* strcpy(char* s1, const char* s2); // freestanding char* strncpy(char* s1, const char* s2, size_t n); // freestanding char* strcat(char* s1, const char* s2); // freestanding char* strncat(char* s1, const char* s2, size_t n); // freestanding int memcmp(const void* s1, const void* s2, size_t n); // freestanding int strcmp(const char* s1, const char* s2); // freestanding int strcoll(const char* s1, const char* s2); int strncmp(const char* s1, const char* s2, size_t n); // freestanding size_t strxfrm(char* s1, const char* s2, size_t n); const void* memchr(const void* s, int c, size_t n); // freestanding void* memchr(void* s, int c, size_t n); // freestanding const char* strchr(const char* s, int c); // freestanding char* strchr(char* s, int c); // freestanding size_t strcspn(const char* s1, const char* s2); // freestanding const char* strpbrk(const char* s1, const char* s2); // freestanding char* strpbrk(char* s1, const char* s2); // freestanding const char* strrchr(const char* s, int c); // freestanding char* strrchr(char* s, int c); // freestanding size_t strspn(const char* s1, const char* s2); // freestanding const char* strstr(const char* s1, const char* s2); // freestanding char* strstr(char* s1, const char* s2); // freestanding char* strtok(char* s1, const char* s2); // freestanding void* memset(void* s, int c, size_t n); // freestanding char* strerror(int errnum); size_t strlen(const char* s); // freestanding } #define NULL /* see description */ // freestanding