Описание тега cstring
Refers to 0-terminated strings as popularized by C, as well as the header-files `string.h` and `cstring`.
A C string is a sequence of non-zero bytes terminated by a NUL byte (0x00), usually used to store ASCII or UTF-8 text.
C strings are defined as char
arrays in C and C++, where char
is an 8-bit type. C strings can be referred to using a char
pointer.
Extensions to the basic C string (e.g. to 16-bit wchar_t
"wide strings") also exist in various programming environments.
In C++, the standard std::string
class interoperates with C strings via the .c_str()
method, though beware that std::string
s can contain embedded 0-bytes.