文件
file:///...xxx/Documents/anrik.realm
po url.scheme file
po url.absoluteURL(包含scheme协议头) file:///...xxx/Documents/anrik.realm
po url.path (一般要获取这个或者relativePath) /...xxx/Documents/anrik.realm
// The same as path if baseURL is nil
po url.relativePath /...xxx/Documents/anrik.realm
网页
https://coding.net/u/xxx/p/Demo_set/git?user=anrik&pwd=123
(lldb) po url.absoluteString https://coding.net/u/xxx/p/Demo_set/git?user=anrik&pwd=123
(lldb) po url.relativeString https://coding.net/u/xxx/p/Demo_set/git?user=anrik&pwd=123
(lldb) po url.scheme https
(lldb) po url.resourceSpecifier //coding.net/u/xxx/p/Demo_set/git?user=anrik&pwd=123
(lldb) po url.host coding.net
(lldb) po url.port 0x0000000000000000
(lldb) po url.user 0x0000000000000000
(lldb) po url.password 0x0000000000000000
(lldb) po url.path /u/xxx/p/Demo_set/git
(lldb) po url.fragment 0x0000000000000000
(lldb) po url.parameterString 0x0000000000000000
(lldb) po url.query user=anrik&pwd=123
(lldb) po url.relativePath /u/xxx/p/Demo_set/git
(lldb) po url.path /u/xxx/p/Demo_set/git
网友评论