// Example 1: find the first non-alphabetic character std::string text = "Hello World!"; llvm::StringRef strRef(text); size_t found = strRef.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); if (found != llvm::StringRef::npos) { std::cout << "The first non-alphabetic character is at position " << found << std::endl; } // Example 2: find the first non-digit character std::string number = "12345"; llvm::StringRef numberRef(number); size_t found = numberRef.find_first_not_of("0123456789"); if (found != llvm::StringRef::npos) { std::cout << "The first non-digit character is at position " << found << std::endl; }In the first example, we use `StringRef find_first_not_of` to find the first non-alphabetic character in a string. We create a `StringRef` from the `std::string` and pass in a range of characters that includes all upper- and lower-case alphabetic characters. If a non-alphabetic character is found, its position is printed to the console. In the second example, we use `StringRef find_first_not_of` to find the first non-digit character in a string. We create a `StringRef` from the `std::string` and pass in a range of characters that includes all digits. If a non-digit character is found, its position is printed to the console. `StringRef find_first_not_of` is provided by the LLVM library, specifically the `llvm::StringRef` class.