移動先: 概要 戻り値 MEL の例

概要

encodeString string

encodeString は「元に戻す」が可能、「照会」が不可能「編集」が不可能です。

このアクションは文字列を取得して、別のコマンドに送る前に回避する必要があるキャラクタをエンコードします。このキャラクタには次のものが含まれます。

戻り値

string

MEL の例

// 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\"); //