Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Latest commit

 

History

History
21 lines (13 loc) · 647 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 647 Bytes

UrlSplitting

split urls

DESCRIPTION:

We all know URLs, http://www.meteogroup.com/en/gb/about-us/careers.html is a popular one.

Develop a class that decomposes a given URL into its constituents. For example, from the above url, we would like to get the result:

The protocol: "http" The domain name: " www.meteogroup.com" The path: “en/gb/about-us/careers.html”

Here are some example tests you could write to design this functionality: "http://some.thing" should give protocol=="http" "ftp://a.large.site" should give domain=="a.large.site" "http://a.site.with/a-path" should give path=="a-path"

What other cases can you think of?