php string

include

include

using namespace std;

int main() { string phpString = "Hello, world!"; cout << "Length of the string: " << phpString.length() << endl; cout << "Character at index 7: " << phpString.at(7) << endl; cout << "Substring from index 3 to 7: " << phpString.substr(3, 5) << endl; cout << "Index of first 'o' in the string: " << phpString.find('o') << endl; cout << "Concatenation with another string: " << phpString + " Welcome to PHP" << endl;

return 0;

}