adalius Beginner
Joined: 23 May 2009 Posts: 15
|
Posted: Sat May 30, 2009 9:22 pm
Escaping ~ In A List From The MUD |
Basically, the mud sends me X~Stuff~Y~MoreStuff~Z~EvenMoreStuff as part of a longer string.
It always comes in pairs or in a hanging pair (X~~Y~Stuff, X is hanging), but the number of pairs isn't fixed,
so one round it could be (X~1~Y~2~Z~A String!), the next it could be (X~~Y~1), etc.
I capture it into a variable, and in the editor when I hover over @T it shows it as typed above. However if I do a #PRINT @T
it does what you'd expect and prints XStuffYMoreStuffZEvenMoreStuff.
I wanted to basically explode() on ~ and store @T into a @T_List var by doing %replace(@T,"~","|").
I've tried using "~","~~","~~~", %literal, %stripq, and so far I can't get it to process it like I'm trying.
I can't change the special char for ~ as it would mess up a metric buttload of scripts.
Thoughts?
EDIT: Ignore this, changed the @T to a literal string type and its working. |
|