MCPcopy Create free account
hub / github.com/apache/trafficserver / build

Method build

src/tsutil/Regex.cc:336–351  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

334
335//----------------------------------------------------------------------------
336bool
337DFA::build(const std::string_view pattern, unsigned flags)
338{
339 Regex rxp;
340 std::string string{pattern};
341
342 if (!(flags & RE_UNANCHORED)) {
343 flags |= RE_ANCHORED;
344 }
345
346 if (!rxp.compile(pattern, flags)) {
347 return false;
348 }
349 _patterns.emplace_back(std::move(rxp), std::move(string));
350 return true;
351}
352
353//----------------------------------------------------------------------------
354int32_t

Callers 1

compileMethod · 0.95

Calls 2

emplace_backMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected