美文网首页
NSURL打印对比

NSURL打印对比

作者: Anrik | 来源:发表于2016-12-16 15:28 被阅读56次

文件

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    

相关文章

网友评论

      本文标题:NSURL打印对比

      本文链接:https://www.haomeiwen.com/subject/smbnmttx.html