#includeint main() { llvm::StringRef hello("Hello, world!"); int length = hello.length(); // length is 13 return 0; }
#includeThese examples use `StringRef` from the LLVM project's ADT (Algorithms and Data Structures) library.int main() { llvm::StringRef hello("Hello, world!"); llvm::StringRef substr = hello.substr(7, 5); int length = substr.length(); // length is 5 return 0; }