Convert a normal string into a tagged string

Author Topic: Convert a normal string into a tagged string  (Read 995 times)

How does one go about doing this?

"string" to 'string' ?

%s = "String to convert";

eval("%s=\'"@%s@"\';"); ???
« Last Edit: December 18, 2013, 07:51:38 AM by MARBLE MAN »

I like your quotation fail :)
eval("%s=\'""@%s@"\';");

Oddly enough, the last time I checked, ''@%s@'' seemed to work as well. This is totally idiotic, but it did seem to work...
EDIT: Nope, just tested it. Totally does not work.


The best way is probably addTaggedString(%s);, which, despite the name, returns the correct value both if the string's never been tagged before as well as if it has.

I like your quotation fail :)
(╯°□°)╯︵ ┻━┻

I like your quotation fail :)
Oddly enough, the last time I checked, ''@%s@'' seemed to work as well. This is totally idiotic, but it did seem to work...
EDIT: Nope, just tested it. Totally does not work.


The best way is probably addTaggedString(%s);, which, despite the name, returns the correct value both if the string's never been tagged before as well as if it has.
How do you use addTaggedString?

How do you use addTaggedString?
%tag = addtaggedstring(%string);

%tag = addtaggedstring(%string);

More clear example:

For commandToServer('foo'), use commandToServer(addTaggedString("foo")).

More clear example:

For commandToServer('foo'), use commandToServer(addTaggedString("foo")).
thanks.