名前空間
変種
操作

標準ライブラリヘッダー <cstring>

From cppreference.com
 
 
標準ライブラリヘッダー
アルゴリズム
<algorithm>
<numeric>
文字列
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
テキスト処理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
数値
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
時間
<chrono> (C++11)
<ctime>
C互換
<ccomplex> (C++11/17/20*)
<ciso646> (C++20 まで)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

このヘッダーは元々C標準ライブラリの <string.h> でした。

このヘッダーは Cスタイルのヌル終端バイト文字列 用です。

目次

マクロ

処理系定義のヌルポインタ定数
(マクロ定数) [編集]

sizeof 演算子が返す符号無し整数型
(typedef) [編集]

関数

文字列操作
ある文字列を別の文字列にコピーする
(関数) [編集]
ある文字列から別の文字列に指定された文字数をコピーする
(関数) [編集]
2つの文字列を連結する
(関数) [編集]
2つの文字列の指定された文字数を連結する
(関数) [編集]
strcmpstrcoll と同じ結果を生成するように文字列を変換する
(関数) [編集]
文字列検査
与えられた文字列の長さを返す
(関数) [編集]
2つの文字列を比較する
(関数) [編集]
2つの文字列から指定された文字数を比較する
(関数) [編集]
現在のロケールに従って2つの文字列を比較する
(関数) [編集]
最初に出現する文字を見つける
(関数) [編集]
最後に出現する文字を見つける
(関数) [編集]
以下から成る最大の初期セグメントの長さを返す
別のバイト文字列に含まれる文字のみ
(関数) [編集]
以下から成る最大の初期セグメントの長さを返す
別のバイト文字列に含まれない文字のみ
(関数) [編集]
区切り文字の集合の中からいずれかの文字が最初に出現する位置を見つける
(関数) [編集]
部分文字列が最初に出現する箇所を見つける
(関数) [編集]
バイト文字列内の次のトークンを見つける
(関数) [編集]
文字配列操作
配列から文字が最初に出現する箇所を検索する
(関数) [編集]
2つのバッファを比較する
(関数) [編集]
バッファを文字で埋める
(関数) [編集]
あるバッファを別のバッファにコピーする
(関数) [編集]
あるバッファを別のバッファに移動する
(関数) [編集]
その他
与えられたエラーコードのテキスト版を返す
(関数) [編集]

[編集] 備考

[編集] 概要

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
English 日本語 中文(简体) 中文(繁體)