#include <iostream>
#include <cstring>
#include <string>
int main() {
std::string str = "Hello, world!";
str[5] = 0;
std::cout << "string says its length is: " << str.length() << std::endl;
std::cout << "strlen says: " << strlen(str.c_str()) << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KI2luY2x1ZGUgPHN0cmluZz4KCmludCBtYWluKCkgewoJc3RkOjpzdHJpbmcgc3RyID0gIkhlbGxvLCB3b3JsZCEiOwoJc3RyWzVdID0gMDsKCXN0ZDo6Y291dCA8PCAic3RyaW5nIHNheXMgaXRzIGxlbmd0aCBpczogIiA8PCBzdHIubGVuZ3RoKCkgPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJzdHJsZW4gc2F5czogIiA8PCBzdHJsZW4oc3RyLmNfc3RyKCkpIDw8IHN0ZDo6ZW5kbDsKCXJldHVybiAwOwp9