<cstring>
The <cstring> header is for the C++ version of the C standard <string.h> header, which declares
string-handling functions.
The functions in this section fall into two categories, identified by the first three letters of the function name:
mem. . .The
memfunctions operate on arbitrary chunks of memory, treating the memory as arrays ofunsignedchar. The caller must specify the size of each memory chunk.str. . .The
strfunctions operate on null-terminated character arrays. Even though the function parameters are declared as typechar, they are always interpreted asunsignedcharwhen comparing two characters.
See also <cwchar> for
wide character string functions.
Note
Instead of using C-style, null-terminated character arrays, C++
code should use the string and
wstring classes that are declared
in the <string> header. C++
strings offer high performance, more flexibility, more safety, and
greater ease of use. The char_traits class template in <string> also provides member
functions for working with narrow and wide character arrays.