MCPcopy Create free account
hub / github.com/NativeScript/android / UrlStartsWith

Function UrlStartsWith

test-app/runtime/src/main/cpp/DevFlags.cpp:48–51  ·  view source on GitHub ↗

Helper to check if a URL starts with a given prefix

Source from the content-addressed store, hash-verified

46
47// Helper to check if a URL starts with a given prefix
48static bool UrlStartsWith(const std::string& url, const std::string& prefix) {
49 if (prefix.size() > url.size()) return false;
50 return url.compare(0, prefix.size(), prefix) == 0;
51}
52
53void InitializeSecurityConfig() {
54 std::call_once(s_securityConfigInitFlag, []() {

Callers 1

IsRemoteUrlAllowedFunction · 0.85

Calls 2

sizeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected