Go to: Synopsis. Return value. MEL examples.
encodeString
string
encodeString is undoable, NOT queryable, and NOT editable.
This action will take a string and encode any character that would need to be escaped before being sent to some other command. Such characters include:string |
// Set the string $s to: print("Hello\n"); string $quote = "\""; // Result: " // string $backslash = "\\"; // Result: \ // string $s = "print(" + $quote + "Hello" + $backslash + "n" + $quote + ");"; // Result: print("Hello\n"); // string $es = `encodeString $s`; // Result: print(\"Hello\\n\"); //