Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jul 21, 2011 at 09:12 AM by biohazard for the following reason:

Solved on my own

avatar image
-1
Question by biohazard · Jul 21, 2011 at 08:45 AM · javascriptstringparsingtextasset

How can i split a string[] ?

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

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Meltdown · Jul 21, 2011 at 09:28 AM 1
Share

This question isn't Unity specific, it is language specific. This forum is not the place to ask simple javascript/c# questions.

avatar image BerggreenDK · Jul 21, 2011 at 10:23 AM 0
Share

I need to see code too if I have to help next time.

1 Reply

  • Sort: 
avatar image
4

Answer by CHPedersen · Jul 21, 2011 at 08:52 AM

Use String.Split:

http://msdn.microsoft.com/en-us/library/system.string.split.aspx

on each of the elements of your array?

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image biohazard · Jul 21, 2011 at 09:00 AM 0
Share

isn't working for string-arrays...only for normal strings.

also, don't try to imply that i didn't do my homework.

avatar image CHPedersen · Jul 21, 2011 at 09:06 AM 1
Share

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 ";"?

avatar image CHPedersen · Jul 21, 2011 at 09:20 AM 2
Share

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 $$anonymous$$utes 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.

avatar image Aldwoni_legacy · Jul 21, 2011 at 09:22 AM 1
Share

biohazard, can you post the solution in case other people have the same problem?

avatar image Eric5h5 · Jul 21, 2011 at 09:30 AM 3
Share

@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.

Show more comments

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Sending a string via email from Unity? 2 Answers

A node in a childnode? 1 Answer

How do you display a saved name on the screen? 2 Answers

Parsing a float from a string with text 1 Answer

Print String 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges