#include "nsACString.h" void compareASCIIString() { const char* asciiStr = "Hello World!"; nsACString nsStr; nsStr.AssignASCII("Hello World!"); // Assign ASCII string to nsACString object // Compare ASCII and nsACString objects if (nsStr.EqualsASCII(asciiStr)) { printf("Both strings are equal!"); } }The above code first initializes an ASCII string and an nsACString object. Then it assigns the ASCII string to the nsACString object. After that, the EqualsASCII method is called to compare both the strings. If both are equal, then it prints a message. In this example, the code is using the Mozilla Gecko SDK library, which contains the nsACString class.