简体   繁体   中英

Why single backslash turns to double backslash

The string "\\domain\\path1\\path2" was turned to "\\\\domain\\\\path1\\\\path2" after using AFNetwork to get the JSON response.

I got two comments "they are same",but the point is that when we use NSURL to create a remote url for EGOImageView to load, that will be different. The double \\\\ will get failed.

Why this happened ?

The backslash character is an escape character which is usually followed by a control character. The escape sequence for a literal backlash is \\\\ . It's worth noting that the backslash is not a path separator in iOS. That would be a forward slash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM