I need a way in C or Objective-C to separate the URI and the Path, given a full URL.
Example:
Given the URL
mms://a11.l412923342423.c658546.g.lm.akamaistream.net/D/13/414392/v0001/reflector:36751
Getting the URL is easy, but how can I determine where the URI ends and where the Path starts, in C or Objective-C?
I know that the URI is a11.l412923342423.c658546.g.lm.akamaistream.net and that the Path is D/13/414392/v0001/reflector:36751, but how to identify that programmatically?
I can’t figure that out and any sample code will GREATLY help me. Thank you.
Looks like
//denotes the start of the URI and a subsequent/marks the start of the path:Edit:
Copying the uri:
or (if it is ok, to alter the original string):