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

Method _findOperator

plugins/esi/lib/Expression.cc:140–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140inline int
141Expression::_findOperator(const char *expr, int expr_len, Operator &op) const
142{
143 string expr_str(expr, expr_len);
144 size_t sep;
145 for (int i = 0; i < N_OPERATORS; ++i) {
146 const OperatorString &op_str = OPERATOR_STRINGS[i];
147 sep = (op_str.str_len == 1) ? expr_str.find(op_str.str[0]) : expr_str.find(op_str.str);
148 if (sep < expr_str.size()) {
149 op = static_cast<Operator>(i);
150 return static_cast<int>(sep);
151 }
152 }
153 return -1;
154}
155
156inline bool
157Expression::_evalSimpleExpr(const char *expr, int expr_len)

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected