Added helper library for URL manipulation functions

This commit is contained in:
2023-03-08 23:27:46 -06:00
parent 1ec2fd1097
commit 7d3ef3a6c9
2 changed files with 49 additions and 0 deletions

12
url_manipulation.h Normal file
View File

@@ -0,0 +1,12 @@
#include <string.h>
/* url_to_proto - This takes in a URL, and returns the protocol.
Example - 'https://example.org' would return 'https'. */
char* url_to_proto(char* url);
/* url_to_hostname - This takes in a URL, and returns the hostname.
Example - 'https://example.org' would return 'example.org'. */
char* url_to_hostname(char* url);