I am writing a mini console and I am trying to figure out how to extract things from a link. For example, in PHP, this is a query variable like this:
http://somelink.com/somephp.php?variable1=10&variable2=20
PHP then calculates the URL parameters and assigns them to a variable.
How would I parse something like this in Swift?
So, given the line I want to take: variable1 = 10 and variable2 = 20, etc., is there an easy way to do this? I tried to walk, but did not know what I was looking for.
I have a really terrible hacker way to do this, but it cannot expand.
Scott source
share