26 lines
		
	
	
		
			542 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			542 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  *  IXUrlParser.h
 | |
|  *  Author: Benjamin Sergeant
 | |
|  *  Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <string>
 | |
| 
 | |
| namespace ix
 | |
| {
 | |
|     class UrlParser
 | |
|     {
 | |
|     public:
 | |
|         static bool parse(const std::string& url,
 | |
|                           std::string& protocol,
 | |
|                           std::string& host,
 | |
|                           std::string& path,
 | |
|                           std::string& query,
 | |
|                           int& port);
 | |
| 
 | |
|         static void printUrl(const std::string& url);
 | |
|     };
 | |
| }
 |