主要内容

Cpp.StringLiteral Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the string_literal nodes in the syntax tree of your code

Since R2026a

Description

The PQL class Cpp.StringLiteral represents the node string_literal in the syntax tree of your code.

#include <iostream>

int main() {
    const char* s1 = "Hello";
    const char* s2 = "Line\\nBreak";
    const char* s3 = "A \"quoted\" string";
    (void)s1; (void)s2; (void)s3;
    return 0;
}

The C++ code shows several string_literal occurrences. Each quoted token like "Hello" corresponds to a Cpp.StringLiteral node.

Predicates

expand all

Version History

Introduced in R2026a