MCPcopy Create free account
hub / github.com/defold/defold / IsValidScheme

Function IsValidScheme

engine/dlib/src/dlib/uri.cpp:31–42  ·  view source on GitHub ↗

NOTE: Does not conform to rfc2396 but good enough for our purposes

Source from the content-addressed store, hash-verified

29{
30 // NOTE: Does not conform to rfc2396 but good enough for our purposes
31 bool IsValidScheme(const char* start, const char* end)
32 {
33 const char*s = start;
34 while (s < end)
35 {
36 if (!isalnum(*s))
37 return false;
38 ++s;
39 }
40
41 return true;
42 }
43
44 // NOTE: This parser is not even close to rfc2396 but good enough for our purposes
45 Result Parse(const char* uri, Parts* parts)

Callers 1

ParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected