MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_strings

Method get_strings

modules/regex/regex.cpp:96–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96PackedStringArray RegExMatch::get_strings() const {
97 PackedStringArray result;
98
99 int size = data.size();
100
101 for (int i = 0; i < size; i++) {
102 int start = data[i].start;
103
104 if (start == -1) {
105 result.append(String());
106 continue;
107 }
108
109 int length = data[i].end - start;
110
111 result.append(subject.substr(start, length));
112 }
113
114 return result;
115}
116
117String RegExMatch::get_string(const Variant &p_name) const {
118 int id = _find(p_name);

Calls 4

substrMethod · 0.80
sizeMethod · 0.65
StringClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected