const char* myString = "Hello, world!"; int length = std::strlen(myString); // length will be 13
const char* string1 = "Hello, world!"; const char* string2 = "Hello, world"; int result = std::strncmp(string1, string2, 13); // result will be 0 (strings are equal)
const char* myString = "Hello, world!"; const char* substring = "world"; const char* result = std::strstr(myString, substring); // result will point to "world!"Overall, the std::str package library is a useful tool for working with strings in C++.