#include#include int main() { JSString str = "Hello, world!"; std::cout << str.length() << std::endl; return 0; }
#includeIn this example, we create a standard C++ string object with the value "Hello, world!". We then call the length() method on the object and print the result, which is also the length of the string (13). Package/library: Standard C++ library (STL)#include int main() { std::string str = "Hello, world!"; std::cout << str.length() << std::endl; return 0; }