File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1818#include < streambuf>
1919#include < sys/types.h>
2020#include < sys/socket.h>
21+ #include < arpa/inet.h>
2122
2223// ---------------------------------------------------------------------
2324
@@ -434,6 +435,18 @@ std::string WSJCppCore::getPointerAsHex(void *p) {
434435 return " 0x" + std::string (stream.str ());
435436}
436437
438+ // ---------------------------------------------------------------------
439+
440+ std::string WSJCppCore::extractURLProtocol (const std::string& sValue ) {
441+ std::string sRet = " " ;
442+ int nPosProtocol = sValue .find (" ://" );
443+ if (nPosProtocol == std::string::npos) {
444+ return sRet ;
445+ }
446+ sRet = sValue .substr (0 , nPosProtocol);
447+ return sRet ;
448+ }
449+
437450// ---------------------------------------------------------------------
438451// WSJCppLog
439452
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ class WSJCppCore {
5252
5353 static unsigned long convertVoidToULong (void *p);
5454 static std::string getPointerAsHex (void *p);
55+ static std::string extractURLProtocol (const std::string& sValue );
5556};
5657
5758
You can’t perform that action at this time.
0 commit comments