D
D
DjPROgramiST2014-07-25 12:12:57
iOS
DjPROgramiST, 2014-07-25 12:12:57

How to split a string by characters in iOS?

There is a comma separated string
file:///Users/andrey.khramtsov/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/2EE2CD00-55B2-4ACB-96FD-FADDB3892C2E/Documents/archives/53d0af37ebb2604cb080e177/images/532d0afbc4 I
use [urls componentsSeparatedByString:@","]
results in an array with elements file:/Users/andrey.khramtsov/Library/Application%2520Support/iPhone%2520Simulator/7.1/Applications/2EE2CD00-55B2-4ACB-96FD-FADDB3892C2E/Documents/ archives/53d0af37ebb2604cb080e177/images/53d0afbcebb2604cb080e17b.jpg -- file:///
because of what can incorrectly divide a line?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
s0L, 2014-07-28
@s0L

Show the code, you most likely have something wrong with the original string. Everything should work with correct initial data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question