#include "nsString.h" int main() { nsAutoString str("Hello"); str.Append("World"); printf("%s\n", NS_ConvertUTF16toUTF8(str).get()); return 0; }In this example, the `nsAutoString` class is used to create a new string object with the value of "Hello". Then, the `Append` function is invoked on this string object with the argument "World". Finally, the resulting string is converted to a UTF-8 encoded string and printed to the console. This code example uses the `nsString.h` package library, which includes the `nsAString` class and other string manipulation functions.