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

Function string2int

plugins/experimental/access_control/common.cc:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#endif /* ACCESS_CONTROL_UNIT_TEST */
45
46int
47string2int(const StringView &s)
48{
49 int t = 0;
50 try {
51 t = std::stoi(String(s));
52 } catch (...) {
53 /* Failed to convert return impossible value */
54 return 0;
55 }
56 return t;
57}
58
59time_t
60string2time(const StringView &s)

Callers 1

initMethod · 0.85

Calls 1

StringClass · 0.50

Tested by

no test coverage detected