MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ExtractVersion

Function ExtractVersion

libi2pd_client/SAM.cpp:84–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 static int ExtractVersion (std::string_view ver)
85 {
86 int version = 0;
87 for (auto ch: ver)
88 {
89 if (ch >= '0' && ch <= '9')
90 {
91 version *= 10;
92 version += (ch - '0');
93 }
94 }
95 return version;
96 }
97
98 static std::string CreateVersion (int ver)
99 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected