MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / IsPrivateIpv4Impl

Function IsPrivateIpv4Impl

runtime/memory_safety_test.cc:146–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146bool IsPrivateIpv4Impl(const StringValue& addr) {
147 // Implementation for demonstration, this is simple but incomplete and
148 // brittle.
149 std::string buf;
150 return absl::StartsWith(addr.ToStringView(&buf), "192.168.") ||
151 absl::StartsWith(addr.ToStringView(&buf), "10.");
152}
153
154absl::StatusOr<std::unique_ptr<Runtime>> ConfigureRuntimeImpl(
155 bool resolve_references, Options evaluation_options) {

Callers

nothing calls this directly

Calls 1

ToStringViewMethod · 0.80

Tested by

no test coverage detected