MCPcopy Create free account
hub / github.com/FastLED/FastLED / port

Method port

src/fl/stl/url.h:55–66  ·  view source on GitHub ↗

Numeric port. Returns the explicit port if present, otherwise the well-known default for the scheme (80 for http, 443 for https, etc.).

Source from the content-addressed store, hash-verified

53 /// Numeric port. Returns the explicit port if present, otherwise the
54 /// well-known default for the scheme (80 for http, 443 for https, etc.).
55 fl::u16 port() const FL_NOEXCEPT {
56 fl::string_view p = port_str();
57 if (p.empty()) {
58 return defaultPort();
59 }
60 fl::u16 result = 0;
61 for (fl::size i = 0; i < p.size(); ++i) {
62 result = static_cast<fl::u16>(result * 10 +
63 static_cast<fl::u16>(p[i] - '0'));
64 }
65 return result;
66 }
67
68 // ---- Whole-URL access ----
69 fl::string_view str() const FL_NOEXCEPT {

Callers 6

FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45
makeServerFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by 2

FL_TEST_FILEFunction · 0.36
FL_TEST_FILEFunction · 0.36