#include "nsACString.h" #includeIn this example, we create an `nsACString` object with the value "Hello, world!", and then use the `FindChar` method to search for the character 'l'. If it's found, the index of the first occurrence is printed to the console. This code sample is part of the Mozilla SpiderMonkey library/package.int main() { nsACString str("Hello, world!"); char c = 'l'; int index = str.FindChar(c); if (index != -1) { std::cout << "Found character '" << c << "' at index " << index << std::endl; } else { std::cout << "Character not found" << std::endl; } return 0; }