|
Hello people, i've parsed a Text asset and now i got each line of the TextAsset inside a String[]. Now i need to split the String[] again at each semicolon. How can i do that? :) any help is appreciated thanks in advance bio
(comments are locked)
|
The question has been closed Jul 21 '11 at 09:12 AM by biohazard for the following reason:
Solved on my own
|
Use String.Split: http://msdn.microsoft.com/en-us/library/system.string.split.aspx on each of the elements of your array? isn't working for string-arrays...only for normal strings. also, don't try to imply that i didn't do my homework.
Jul 21 '11 at 09:00 AM
biohazard
Your question didn't imply you HAD done your homework. It did, however, imply you appreciated "any help". Downvoting is not "appreciating any help". Your question is too incompletely phrased to be able to answer properly. To be able to describe how to parse data for you, you have to give an example of what your data looks like. Splitting strings based on some character is typically done with String.Split. What does your string[] contain? Do some elements of the array consist of a single ";"?
Jul 21 '11 at 09:06 AM
CHPedersen
The thing is, UA should really be used as a last resort, in my humble opinion. Users learn Unity through self-study far quicker than having solutions handed to them, so only when all methods and ideas known to the user have been exhausted, should the user post a question and consult more experienced users. Ask yourself this: If you can solve your own question within 28 minutes of having asked it, did you then exhaust your own knowledge before you polled ours? If it only took just shy of half an hour, then HAD you really done your homework? All things aside, I never did mean to create a toxic atmosphere, and I'm sorry if you took offense. :) I'm glad you did manage to get it solved, and a nice day to you, too.
Jul 21 '11 at 09:20 AM
CHPedersen
biohazard, can you post the solution in case other people have the same problem?
Jul 21 '11 at 09:22 AM
Aldwoni
@biohazard: In what way was the supplied link "not related to the subject"? It's precisely related to the subject that you're asking about (splitting strings). I doubt there are any links which would be more relevant.
Jul 21 '11 at 09:30 AM
Eric5h5
(comments are locked)
|

This question isn't Unity specific, it is language specific. This forum is not the place to ask simple javascript/c# questions.
I need to see code too if I have to help next time.