#includeusing namespace rho; int main() { // create a rho String from a string literal String str1("hello world"); // create a rho String from a std::string std::string s = "foo bar"; String str2(s); // create a rho String from a char array char arr[] = {'a', 'b', 'c'}; String str3(arr, sizeof(arr)); return 0; }
#includeThe rho String library is packaged as a header-only library, meaning that no additional libraries or binaries need to be installed. It can be included in your C++ project simply by including the `rhostring.hpp` header file.using namespace rho; int main() { String str1("hello"); String str2("world"); // concatenate two strings using the + operator String str3 = str1 + " " + str2; // or using the append function str1.append(" "); str1.append(str2); return 0; }