Mohammad Shaker
Mohammad Shaker

Reputation: 185

Use \u as part of NSString

i have link with \u in \uploads , it consider it as special character how can i solve this problem

 NSString *fullPath = [NSString stringWithFormat:@"http:\\www.school-link.net\uploads\%@",image_url];

Error is

\u used with no following hex digits xcode

thank you

Upvotes: 0

Views: 1092

Answers (3)

Jeff Mark
Jeff Mark

Reputation: 181

URLs have forward slashes (/) not back slashes (\). This is probably what you want:

NSString *fullPath = [NSString stringWithFormat:@"http://www.school-link.net/uploads/%@", image_url];

Upvotes: 0

dmerlea
dmerlea

Reputation: 936

 NSString *fullPath = [NSString stringWithFormat:@"http:\\www.school-link.net\\\uploads\%@",image_url];

Upvotes: 1

Thallius
Thallius

Reputation: 2619

You must escape the backslash using "\\u"

Upvotes: 2

Related Questions