- Home /
Remove TAB from parsed string
This is a new problem arising from my previous question : http://answers.unity3d.com/questions/291294/stringequals-not-working-as-expected.html
I am reading a texture packer text info file, and after removing \r \n
and space , the file still shows spaces, and this is confirmed when the string is split.
How do I remove the Tabbed space from a string using String.Replace(" TAB ", ""); ?
e.g. a Debug returns Debug.Log( "tempBulk = " + tempBulk );
returns tempBulk = "frames""background.png" SPACE "frame""x"2,"y"2,"w"480,"h"320, SPACE "rotated"false, SPACE "trimmed"false, "
have you tried "\\t" ?
No, and thankyou very much, tested and working ! I just learned of \r
tonight while doing this. Great link, please post this as an answer
Answer by Seth-Bergman · Jul 27, 2012 at 04:21 PM
have you tried "\\t" ?
http://www.w3schools.com/js/js_special_characters.asp
hey....
I finally got one
WOOT!
And I can't tell ya how happy I am also for it . Nice job =]
Btw. The backslash-escape characters are the same in most languages. Since they are all c-style languages, just see:
Answer by Bunny83 · Jul 27, 2012 at 09:17 PM
Why don't you use a JSON parser? I've written a very simple and small but powerful parser:
When you want to use it from UnityScript you have to place it in "Assets/Plugins/".
Here's a example file for UnityScript
And here the same example in C#
Too funny. I just spent all night working and then answered the question that prompted my motivation to do this (I have wanted to for a while, since doing a .fnt parser). $$anonymous$$y result : http://answers.unity3d.com/questions/290643/atlas-tool-like-ngui.html
I started by looking at UIToolkit's $$anonymous$$iJSON but didn't understand a line of it.
So is this the point where I break down or start laughing maniacally ?
Thankyou for passing that on and sharing. after a morning nap I shall look right through that, am sure it will help me alot (I would really like to get to the stage where I can do things like this and dictionary's). Thumb Up =]
Your answer
Follow this Question
Related Questions
remove quotation marks from a parsed string 2 Answers
script default variable value behaviour 2 Answers
Array of random loot items inside GUI.window 1 Answer
Combo Script Problem 1 Answer
Array of Array 1 Answer